/* =====================================================
   TranslateXYZ — Promo banner
   Sticky bottom banner · slide-in · button pulse · ribbon blast
   ===================================================== */

/* ----- Banner shell ----- */
.promo-banner[hidden] { display: none !important; }
.promo-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    color: #fff;
    background:
        radial-gradient(800px 200px at 20% 0%, rgba(48,178,48,0.35), transparent 60%),
        radial-gradient(800px 200px at 80% 100%, rgba(48,178,48,0.20), transparent 60%),
        linear-gradient(180deg, #16291A 0%, #0A1A0A 100%);
    border-top: 1px solid rgba(48,178,48,0.45);
    box-shadow:
        0 -8px 24px rgba(0,0,0,0.30),
        0 -1px 0 rgba(255,255,255,0.04) inset;
    transform: translateY(100%);
    transition: transform var(--t-base);
    will-change: transform;
}
.promo-banner.is-visible {
    transform: translateY(0);
}
.promo-banner__inner {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: 14px var(--container-pad);
    position: relative;
}

/* When banner is visible, push body content up so footer/floater don't collide */
body.has-promo-banner {
    padding-bottom: 64px;
}

/* ----- Badge (offer + active variants) ----- */
.promo-banner__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    color: var(--green-300);
    background: rgba(48,178,48,0.18);
    border: 1px solid rgba(48,178,48,0.40);
    border-radius: var(--r-pill);
    padding: 5px 12px;
    line-height: 1;
}
.promo-banner__badge--active {
    color: #fff;
    background: var(--green-500);
    border-color: var(--green-400);
    box-shadow: 0 4px 14px rgba(48,178,48,0.35);
}
.promo-banner__badge svg {
    width: 12px; height: 12px;
}

/* ----- Message ----- */
.promo-banner__message {
    margin: 0;
    flex: 1;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-on-dark);
    line-height: var(--lh-snug);
}

/* ----- Apply Discount CTA (offer state) ----- */
.promo-banner__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    background: var(--green-500);
    color: #fff;
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    border: none;
    border-radius: var(--r-pill);
    padding: 10px 18px;
    cursor: pointer;
    text-decoration: none;
    box-shadow:
        0 6px 18px rgba(48,178,48,0.45),
        inset 0 1px 0 rgba(255,255,255,0.18);
    transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
    animation: promo-cta-pulse 2.2s ease-in-out infinite;
}
.promo-banner__cta:hover {
    background: var(--green-600);
    transform: translateY(-1px) scale(1.02);
    animation-play-state: paused;
}
.promo-banner__cta:active { transform: translateY(0); }
.promo-banner__cta svg { width: 14px; height: 14px; }

@keyframes promo-cta-pulse {
    0%, 100% { transform: scale(1);     box-shadow: 0 6px 18px rgba(48,178,48,0.45), inset 0 1px 0 rgba(255,255,255,0.18); }
    50%      { transform: scale(1.04);  box-shadow: 0 8px 28px rgba(48,178,48,0.65), 0 0 0 6px rgba(48,178,48,0.18), inset 0 1px 0 rgba(255,255,255,0.18); }
}
@media (prefers-reduced-motion: reduce) {
    .promo-banner__cta { animation: none; }
    .promo-banner       { transition: none; }
}

/* ----- Countdown timer (active state) ----- */
.promo-banner__timer {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: #fff;
}
.promo-banner__timer-ico {
    width: 22px; height: 22px;
    color: var(--green-300);
    flex-shrink: 0;
}

/* H / M / S blocks */
.promo-banner__timer-blocks {
    display: inline-flex;
    align-items: stretch;
    gap: 4px;
    font-variant-numeric: tabular-nums;
}
.promo-banner__timer-unit {
    display: inline-flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 4px 8px;
    background: linear-gradient(180deg, rgba(48,178,48,0.20), rgba(48,178,48,0.05));
    border: 1px solid rgba(48,178,48,0.35);
    border-radius: 32px;
    line-height: 1;
}
.promo-banner__timer-num {
    font-size: 18px;
    font-weight: var(--fw-extra);
    color: #fff;
    letter-spacing: 0.02em;
    line-height: 1;
}
.promo-banner__timer-label {
    margin-top: 3px;
    font-size: 9px;
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-wider);
    text-transform: uppercase;
    color: var(--green-300);
    line-height: 1;
}
.promo-banner__timer-sep {
    align-self: center;
    color: var(--green-300);
    font-size: 14px;
    font-weight: var(--fw-extra);
    line-height: 1;
    transform: translateY(-4px); /* visually center between the number row, ignoring labels */
    opacity: 0.7;
}

/* Subtle pulse on the seconds block so the timer feels alive */
.promo-banner__timer-unit:last-of-type .promo-banner__timer-num {
    animation: promo-tick-pulse 1s ease-in-out infinite;
    color: var(--green-300);
}
.is-hurry .promo-banner__timer-unit:last-of-type .promo-banner__timer-num {
    color: var(--amber-300);
}
@keyframes promo-tick-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.7; }
}
@media (prefers-reduced-motion: reduce) {
    .promo-banner__timer-unit:last-of-type .promo-banner__timer-num { animation: none; }
}

/* ----- Dismiss button ----- */
.promo-banner__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    color: var(--text-on-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.promo-banner__close:hover {
    background: rgba(255,255,255,0.16);
    color: #fff;
    border-color: rgba(255,255,255,0.30);
}
.promo-banner__close svg { width: 12px; height: 12px; }

/* ----- States ----- */
.promo-banner__state {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    flex: 1;
    min-width: 0;
}
.promo-banner__state[hidden] { display: none !important; }

/* ===========================================
   APPLY-DISCOUNT SCROLL-BLAST animation
   Class .promo-blast added briefly to the #pricing wrapper on click
   =========================================== */
.promo-blast {
    position: relative;
}
.promo-blast::before,
.promo-blast::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 10px;
    height: 32px;
    background: var(--green-500);
    border-radius: 3px;
    pointer-events: none;
    transform-origin: center top;
    animation: promo-blast-ribbon 2600ms cubic-bezier(0.16, 0.84, 0.34, 1) forwards;
    z-index: 4;
}
.promo-blast::after { animation-delay: 180ms; background: var(--amber-500); }

/* The actual particles are injected by JS into a .promo-blast__particles div */
.promo-blast__particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 4;
}
.promo-blast__particle {
    position: absolute;
    top: 40%; left: 50%;
    width: 12px; height: 32px;
    border-radius: 3px;
    transform-origin: center;
    animation: promo-blast-particle 2800ms cubic-bezier(0.16, 0.84, 0.34, 1) forwards;
    animation-delay: var(--delay, 0ms);
    will-change: transform, opacity;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Central radial flash — the "POP" moment */
.promo-blast__flash {
    position: absolute;
    top: 40%; left: 50%;
    width: 90px;
    height: 90px;
    margin: -45px 0 0 -45px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255,255,255,0.95) 0%,
        rgba(176,251,176,0.85) 25%,
        rgba(48,178,48,0.55)   55%,
        transparent            80%);
    pointer-events: none;
    z-index: 3;
    animation: promo-blast-flash 1500ms cubic-bezier(0.16, 0.84, 0.34, 1) forwards;
}

@keyframes promo-blast-ribbon {
    0%   { transform: translate(-50%, -50%) rotate(0deg)    scale(0.5); opacity: 0; }
    10%  { transform: translate(-50%, -50%) rotate(45deg)   scale(1.1); opacity: 1; }
    100% { transform: translate(-50%, -260%) rotate(1080deg) scale(0.4); opacity: 0; }
}
@keyframes promo-blast-particle {
    0%   { transform: translate(-50%, -50%) rotate(0deg)             scale(0.5); opacity: 0; }
    6%   { transform: translate(-50%, -50%) rotate(0deg)             scale(1.1); opacity: 1; }
    60%  { opacity: 1; }
    100% { transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) rotate(var(--rot, 360deg)) scale(0.3); opacity: 0; }
}
@keyframes promo-blast-flash {
    0%   { transform: scale(0.3); opacity: 0.95; }
    35%  { transform: scale(2.4); opacity: 0.7;  }
    100% { transform: scale(7.0); opacity: 0;    }
}

/* Pricing card glow ring — pulses 3x over the blast window */
.promo-blast .pricing-card,
.promo-blast .pricing-bundle__card,
.promo-blast .pricing-card--full,
.promo-blast .pricing-bundle__card--light {
    animation: promo-blast-card-glow 2.6s ease-out forwards;
}
@keyframes promo-blast-card-glow {
    0%   { box-shadow: 0 0 0 0   rgba(48,178,48,0); }
    15%  { box-shadow: 0 0 0 6px rgba(48,178,48,0.60), 0 0 56px rgba(48,178,48,0.55); }
    35%  { box-shadow: 0 0 0 2px rgba(48,178,48,0.25), 0 0 24px rgba(48,178,48,0.20); }
    55%  { box-shadow: 0 0 0 6px rgba(48,178,48,0.55), 0 0 48px rgba(48,178,48,0.45); }
    75%  { box-shadow: 0 0 0 3px rgba(48,178,48,0.30), 0 0 30px rgba(48,178,48,0.25); }
    100% { box-shadow: 0 0 0 0   rgba(48,178,48,0); }
}

/* Price tween glow — stronger green text-shadow flash + brief weight bump */
.is-price-animating {
    animation: promo-price-flash 1400ms ease-out;
}
@keyframes promo-price-flash {
    0%   { text-shadow: 0 0 0 transparent; }
    15%  { text-shadow:
                0 0 22px rgba(48,178,48,0.95),
                0 0 8px  rgba(255,255,255,0.55); }
    35%  { text-shadow:
                0 0 18px rgba(48,178,48,0.80); }
    65%  { text-shadow:
                0 0 12px rgba(48,178,48,0.50); }
    100% { text-shadow: 0 0 0 transparent; }
}

@media (prefers-reduced-motion: reduce) {
    .promo-blast::before, .promo-blast::after, .promo-blast__particle,
    .promo-blast__flash,
    .promo-blast .pricing-card, .promo-blast .pricing-bundle__card,
    .promo-blast .pricing-card--full, .promo-blast .pricing-bundle__card--light,
    .is-price-animating {
        animation: none;
    }
}

/* ===========================================
   FLOATING Y/L TOGGLE — move up when banner visible
   =========================================== */
body.has-promo-banner .pricing-float-toggle {
    bottom: calc(76px + var(--sp-3));
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 900px) {
    .promo-banner__inner {
        flex-wrap: wrap;
        gap: var(--sp-3);
    }
    .promo-banner__state {
        flex-wrap: wrap;
        gap: var(--sp-3);
    }
    .promo-banner__message {
        flex: 1 1 100%;
        order: 2;
        font-size: var(--fs-xs);
    }
    .promo-banner__badge { order: 1; }
    .promo-banner__cta   { order: 3; }
    .promo-banner__timer { order: 3; }
    .promo-banner__close {
        position: absolute;
        top: 8px;
        right: 8px;
    }
    body.has-promo-banner { padding-bottom: 140px; }
}
@media (max-width: 480px) {
    .promo-banner__inner { padding: 12px var(--sp-4); }
    .promo-banner__cta   { width: 100%; justify-content: center; }
    .promo-banner__timer { width: 100%; justify-content: center; }
    .promo-banner__timer-unit { min-width: 38px; padding: 3px 6px; }
    .promo-banner__timer-num  { font-size: 16px; }
    .promo-banner__timer-label{ font-size: 8px; }
}

/* ===========================================
   PASSIVE CLAIM CHIP — above pricing toggle
   Shown only while the footer banner is in OFFER state
   =========================================== */
.promo-claim-chip[hidden] { display: none !important; }
.promo-claim-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto var(--sp-4);
    padding: 8px 8px 8px 14px;
    background: linear-gradient(135deg, var(--green-50) 0%, var(--bg-light) 100%);
    border: 1px solid var(--green-300);
    border-radius: var(--r-pill);
    box-shadow:
        0 4px 14px rgba(48,178,48,0.15),
        inset 0 1px 0 rgba(255,255,255,0.6);
    max-width: 100%;
    flex-wrap: wrap;
    /* enter animation — JS adds .is-visible to fade in */
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity var(--t-base), transform var(--t-base);
}
.promo-claim-chip.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.promo-claim-chip__icon {
    font-size: 16px;
    line-height: 1;
}
.promo-claim-chip__text {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--green-700);
    line-height: 1.2;
}
.promo-claim-chip__btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--green-500);
    color: #fff;
    border: none;
    border-radius: var(--r-pill);
    padding: 6px 12px;
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    cursor: pointer;
    text-decoration: none;
    box-shadow:
        0 3px 10px rgba(48,178,48,0.30),
        inset 0 1px 0 rgba(255,255,255,0.20);
    transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.promo-claim-chip__btn:hover {
    background: var(--green-600);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(48,178,48,0.40), inset 0 1px 0 rgba(255,255,255,0.20);
}
.promo-claim-chip__btn:active { transform: translateY(0); }
.promo-claim-chip__btn svg { width: 12px; height: 12px; }

/* Dark surfaces (homepage bundle compact + product page pricing-single):
   white surface chip pops cleanly on the dark gradient */
.pricing-bundle .promo-claim-chip,
.pricing-single .promo-claim-chip {
    background: rgba(255,255,255,0.95);
    border-color: var(--green-400);
}
.pricing-bundle .promo-claim-chip__text,
.pricing-single .promo-claim-chip__text { color: var(--green-700); }

/* ===========================================
   ACTIVE STATE — discount applied, before hurry kicks in
   Cooler/brighter palette: lime-green highlight + cyan accent
   so the banner visibly shifts from "offer" to "activated success"
   =========================================== */
.promo-banner.is-active {
    background:
        radial-gradient(820px 220px at 18% 0%, rgba(86,241,134,0.38), transparent 60%),
        radial-gradient(820px 220px at 85% 100%, rgba(111,223,251,0.22), transparent 60%),
        linear-gradient(180deg, #0F2C18 0%, #07180A 100%);
    border-top-color: rgba(111,223,251,0.45);
}
.promo-banner.is-active .promo-banner__timer-ico,
.promo-banner.is-active .promo-banner__timer-label,
.promo-banner.is-active .promo-banner__timer-sep {
    color: var(--green-300);
}

/* ===========================================
   HURRY STATE — after 7 minutes of activation with no checkout
   Amber accent layered on top of the green banner + one-time shake
   =========================================== */
.promo-banner.is-hurry {
    background:
        radial-gradient(800px 200px at 20% 0%, rgba(233,197,19,0.30), transparent 60%),
        radial-gradient(800px 200px at 80% 100%, rgba(184,58,43,0.15), transparent 60%),
        linear-gradient(180deg, #2A2010 0%, #1A1108 100%);
    border-top-color: rgba(233,197,19,0.55);
}
.promo-banner.is-hurry .promo-banner__badge--active {
    background: var(--amber-500);
    border-color: var(--amber-600);
    color: var(--neutral-900);
    box-shadow: 0 4px 14px rgba(233,197,19,0.40);
}
.promo-banner.is-hurry .promo-banner__timer {
    border-color: rgba(233,197,19,0.55);
}
.promo-banner.is-hurry .promo-banner__timer-unit {
    border-color: rgba(233,197,19,0.50);
    background: linear-gradient(180deg, rgba(233,197,19,0.22), rgba(233,197,19,0.05));
}
.promo-banner.is-hurry .promo-banner__timer-label,
.promo-banner.is-hurry .promo-banner__timer-sep {
    color: var(--amber-300);
}
.promo-banner.is-hurry .promo-banner__timer-ico {
    color: var(--amber-300);
}

/* One-time attention pulse — added via .is-hurry-flash, removed after run */
.promo-banner.is-hurry-flash {
    animation: promo-hurry-shake 600ms cubic-bezier(0.36, 0.07, 0.19, 0.97) 1;
}
@keyframes promo-hurry-shake {
    0%, 100% { transform: translate3d(0, 0, 0); }
    10%      { transform: translate3d(-4px, 0, 0); }
    25%      { transform: translate3d(5px, 0, 0); }
    40%      { transform: translate3d(-5px, 0, 0); }
    55%      { transform: translate3d(4px, 0, 0); }
    70%      { transform: translate3d(-3px, 0, 0); }
    85%      { transform: translate3d(2px, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .promo-banner.is-hurry-flash { animation: none; }
}
