/* ============================================================================
   FuelYourDNA – Flash Sale Popup (FLASH25)
   Self-contained styles. Auto-disables itself after Wed May 20, 2026
   via JS. CSS is harmless if left in production after that date.
   Pattern mirrors mothers-day-popup.css for consistency.
   ============================================================================ */

/* Backdrop — soft dim, blurred */
.flash-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 16, 24, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}

.flash-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* Card */
.flash-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    background:
        radial-gradient(circle at 0% 0%, #fff7ed 0%, transparent 55%),
        radial-gradient(circle at 100% 100%, #ffedd5 0%, transparent 55%),
        #ffffff;
    border-radius: 22px;
    box-shadow:
        0 24px 60px -12px rgba(234, 88, 12, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    padding: 2.25rem 1.75rem 1.75rem;
    text-align: center;
    transform: translateY(24px) scale(0.97);
    opacity: 0;
    transition: transform .45s cubic-bezier(.2,.8,.25,1), opacity .35s ease;
    overflow: hidden;
}

.flash-backdrop.is-open .flash-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Decorative top ribbon */
.flash-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, #fb923c, #f97316, #ea580c, #f97316, #fb923c);
    background-size: 200% 100%;
    animation: flash-shimmer 4s linear infinite;
}

@keyframes flash-shimmer {
    from { background-position: 0% 0; }
    to   { background-position: 200% 0; }
}

/* Decorative glow */
.flash-card::after {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 140px; height: 140px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.18) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

/* Close button */
.flash-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 34px; height: 34px;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    font-size: 1.05rem;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    z-index: 2;
}
.flash-close:hover {
    background: #fff;
    color: #111;
    transform: rotate(90deg);
}

/* Badge */
.flash-badge {
    display: inline-block;
    padding: .35rem .9rem;
    background: linear-gradient(135deg, #ffedd5, #fed7aa);
    color: #c2410c;
    font-weight: 700;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: 999px;
    margin-bottom: .85rem;
}

.flash-emoji {
    font-size: 2.6rem;
    line-height: 1;
    margin-bottom: .4rem;
    filter: drop-shadow(0 4px 8px rgba(249, 115, 22, 0.35));
}

/* Big discount headline */
.flash-discount {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #f97316, #dc2626);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: .25rem 0 .35rem;
    letter-spacing: -.02em;
}

.flash-title {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.2;
    color: #1a2e1a;
    margin: 0 0 .55rem;
}

.flash-subtitle {
    font-size: .95rem;
    color: #4b5563;
    line-height: 1.5;
    margin: 0 0 1.25rem;
}

/* Code box */
.flash-code-row {
    display: flex;
    align-items: stretch;
    gap: .5rem;
    margin: 0 auto 1rem;
    max-width: 320px;
}
.flash-code {
    flex: 1;
    padding: .85rem 1rem;
    background: #fff;
    border: 2px dashed #f97316;
    border-radius: 12px;
    font-family: 'Space Mono', ui-monospace, monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: #c2410c;
    letter-spacing: .12em;
    user-select: all;
}
.flash-copy {
    padding: .85rem 1rem;
    background: #fff;
    border: 2px solid #fed7aa;
    border-radius: 12px;
    color: #c2410c;
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}
.flash-copy:hover {
    background: #fff7ed;
    border-color: #f97316;
}
.flash-copy.copied {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.flash-validity {
    font-size: .8rem;
    color: #6b7280;
    margin: 0 0 1.25rem;
}
.flash-validity strong { color: #c2410c; }

.flash-cta {
    display: inline-block;
    width: 100%;
    padding: .95rem 1.5rem;
    background: linear-gradient(135deg, #f97316, #dc2626);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s, box-shadow .2s;
    box-shadow: 0 8px 20px -6px rgba(249, 115, 22, 0.55);
}
.flash-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px -6px rgba(249, 115, 22, 0.7);
    color: #fff;
}

.flash-skip {
    display: block;
    margin-top: .65rem;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: .8rem;
    cursor: pointer;
    text-decoration: underline;
}
.flash-skip:hover { color: #6b7280; }

/* Mobile */
@media (max-width: 480px) {
    .flash-card { padding: 2rem 1.25rem 1.4rem; }
    .flash-discount { font-size: 2.8rem; }
    .flash-title { font-size: 1.25rem; }
    .flash-subtitle { font-size: .9rem; }
    .flash-code { font-size: 1.05rem; }
}
