/**
 * PepperLabz Conversion Event — Promo / Lab Event Bar styling.
 * Loads sitewide (not page-restricted) — harmless when the bar's markup
 * isn't rendered at all (checkout, or promo_bar flag off), since these
 * rules simply match nothing. Deliberately NOT position: fixed/sticky —
 * see pepperlabz-event-promo-bar.php for why: normal document flow,
 * directly below the fixed header, scrolls away naturally.
 *
 * Palette: graphite (#1C1F23) ground, paper/silver text, one restrained
 * chrome accent line — not a copy of any competitor's bar styling.
 */

.plz-promo-bar {
    background: #1C1F23;
    border-bottom: 1px solid rgba(196, 202, 209, 0.25);
    position: relative;
    z-index: 1;
}

/**
 * Continuous slow left-to-right-and-back chrome shimmer (revised
 * 2026-09-13 per owner direction — replaces the earlier one-time mount
 * sweep). Pure CSS background-position animation on an oversized gradient,
 * no image layer, no extra HTTP request, no layout shift — the element's
 * box size never changes, only where the gradient sits within it.
 * "alternate" makes it travel right then back left, matching "liquid
 * metal catching light," not a marquee. Static (non-animated) gradient
 * fallback for prefers-reduced-motion below.
 */
.plz-promo-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #C4CAD1, #FFFFFF, #C4CAD1, transparent);
    background-size: 250% 100%;
    background-position: 0% 0%;
    opacity: 0.6;
}

@media (prefers-reduced-motion: no-preference) {
    .plz-promo-bar::before {
        animation: plzPromoBarShimmer 6s ease-in-out infinite alternate;
    }
}

@keyframes plzPromoBarShimmer {
    from { background-position: 0% 0%; }
    to { background-position: 100% 0%; }
}

.plz-promo-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #F1F3F5;
    text-align: center;
}

.plz-promo-bar-event {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-weight: 800;
    color: #FFFFFF;
    text-transform: none;
}

.plz-promo-bar-headline {
    color: #F1F3F5;
}

.plz-promo-bar-sep {
    color: #79818A;
}

.plz-promo-bar-countdown {
    color: #C4CAD1;
    font-variant-numeric: tabular-nums;
}

.plz-promo-bar-countdown #plzPromoBarCountdownValue {
    color: #FFFFFF;
    font-weight: 800;
}

/* One-time chrome sweep on mount — not a loop, answers the bar's own
   appearance rather than running ambiently. */
@media (prefers-reduced-motion: no-preference) {
    .plz-promo-bar {
        animation: plzPromoBarSweepIn 0.5s ease-out;
    }
}

@keyframes plzPromoBarSweepIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .plz-promo-bar-inner {
        font-size: 12px;
        padding: 8px 14px;
        gap: 6px;
    }

    .plz-promo-bar-sep {
        display: none;
    }

    .plz-promo-bar-inner {
        flex-direction: column;
        gap: 2px;
    }
}
