/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 *
 * Welcome Offer promo modal styling.
 * Centered two-column dialog with countdown, discount badge and product cards.
 * Desktop: side-by-side left/right panels. Mobile: stacked single column.
 */

/* ============================================================
   Container (full-screen overlay wrapper)
   ============================================================ */
.welcome-offer-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.welcome-offer-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: womFadeIn 0.3s ease;
}

/* ============================================================
   Overlay backdrop
   ============================================================ */
.wom-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ============================================================
   Dialog card
   ============================================================ */
.wom-dialog {
    position: relative;
    background: #1a1a2e;
    border-radius: 20px;
    width: 90%;
    max-width: 820px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    animation: womSlideUp 0.35s ease;
    z-index: 10501;
    display: flex;
    flex-direction: row;
    color: #ffffff;
}

/* ============================================================
   Close button
   ============================================================ */
.wom-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s, transform 0.15s;
    z-index: 10;
}

.wom-close:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: scale(1.1);
}

/* ============================================================
   Left panel
   ============================================================ */
.wom-left {
    flex: 0 0 52%;
    padding: 36px 32px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* Top bar: badge + countdown */
.wom-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.wom-badge {
    background: #f97316;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.wom-countdown-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wom-countdown-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
}

.wom-countdown {
    display: flex;
    align-items: center;
    gap: 2px;
}

.wom-cd-seg {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    padding: 4px 8px;
    border-radius: 6px;
    min-width: 34px;
    text-align: center;
    letter-spacing: 1px;
}

.wom-cd-sep {
    color: rgba(255, 255, 255, 0.55);
    font-size: 18px;
    font-weight: 700;
    padding: 0 1px;
}

/* Headline */
.wom-headline {
    font-size: 26px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    margin: 0 0 8px;
}

.wom-headline strong {
    color: #60a5fa;
}

.wom-subheadline {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 24px;
}

/* Coupon code row */
.wom-coupon-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.wom-coupon-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

.wom-coupon-code {
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px dashed rgba(255, 255, 255, 0.35);
    color: #fbbf24;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background 0.2s, border-color 0.2s;
}

.wom-coupon-code:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.55);
}

.wom-coupon-code .wom-check-icon {
    color: #4ade80;
}

.wom-discount-pct {
    background: #16a34a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Primary CTA button */
.wom-cta {
    display: block;
    text-align: center;
    background: #f97316;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 14px 24px;
    border-radius: 10px;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    margin-top: auto;
    border: none;
}

.wom-cta:hover {
    background: #ea6f0e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
    color: #ffffff !important;
}

/* ============================================================
   Right panel: product cards
   ============================================================ */
.wom-right {
    flex: 0 0 48%;
    padding: 36px 24px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wom-products {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.wom-product-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 12px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    text-decoration: none !important;
    color: #ffffff !important;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    cursor: pointer;
}

.wom-product-card:hover {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-3px);
    color: #ffffff !important;
    text-decoration: none !important;
}

.wom-product-img-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wom-product-img-wrap.wom-product-img-placeholder {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.4);
}

.wom-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wom-product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.wom-product-title {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wom-product-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wom-product-price {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.wom-price-original {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
}

.wom-price-current {
    color: #4ade80;
    font-weight: 700;
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes womFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes womSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   Responsive: tablet / mobile
   ============================================================ */
@media (max-width: 768px) {
    .wom-dialog {
        flex-direction: column;
        width: 95%;
        max-width: 440px;
        max-height: 95vh;
    }

    .wom-left {
        flex: none;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 28px 22px 22px;
    }

    .wom-right {
        flex: none;
        padding: 22px;
    }

    .wom-headline {
        font-size: 20px;
    }

    .wom-products {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .wom-product-img-wrap {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 400px) {
    .wom-products {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Print: never print the promo modal
   ============================================================ */
@media print {
    .welcome-offer-modal {
        display: none !important;
    }
}
