/* BT-2004: Christmas 2026 top bar for the Awaken Performance pages.
   Figma "Xmas 2026" > "Pages AP / XMAS 2026" > "XMAS2026 / V2 / Tuning" desktop 1440x30 / mobile 375x43
   (same artwork as "XMAS 2026 / Navbar / separate exports" 262:6636 / 262:6651).
   Rendered by components/topbar-xmas2026.html.twig while appPerformance.isSaleActiveXmas is true.
   The bar is sticky at the viewport top and the sticky #header that follows it is pushed down
   by the bar height, so both stay visible while scrolling (same mechanism as bf2026-topbar.css). */

#xmas2026-topbar {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    /* one above bootstrap .sticky-top (#header): once scrolled, the header's transparent
       top padding (#header.bg-black) overlaps the bar and must not swallow the click;
       the side cart (1021) comes later in the DOM and still overlays both */
    z-index: 1021;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 30px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    outline-offset: -2px;
    cursor: pointer;
    /* Navy frame + blurred winter photo + navy layer, baked from the Figma frame. */
    background: #060a0f url('../img/xmas2026/bg-desktop.jpg') center / cover no-repeat;
    -webkit-appearance: none;
    appearance: none;
}

#xmas2026-topbar picture {
    display: block;
    flex-shrink: 0;
    line-height: 0;
}

/* "Center-safe offer" lockup: 340x30 in Figma, the SVG is 2px wider each side for the glows. */
#xmas2026-topbar .xmas2026-topbar__offer {
    display: block;
    width: 344px;
    max-width: none;
    height: 30px;
}

/* The page header is bootstrap .sticky-top (top: 0); stack it under the bar. */
#xmas2026-topbar ~ #header.sticky-top {
    top: 30px;
}

/* Desktop scroll state: app.js adds .bg-black past 35px and style-performance.css
   then gives the header 40px of transparent top padding with top: -40px so the
   black nav sits flush at the viewport top. Keep that offset relative to the bar. */
@media only screen and (min-width: 1024px) {
    #xmas2026-topbar ~ #header.sticky-top.bg-black {
        top: -10px;
    }
}

@media screen and (max-width: 767px) {
    #xmas2026-topbar {
        height: 43px;
        background-image: url('../img/xmas2026/bg-mobile.jpg');
    }

    #xmas2026-topbar ~ #header.sticky-top {
        top: 43px;
    }
}

/* Phones narrower than the 340px lockup (320px): shrink it so it stays whole. */
@media screen and (max-width: 359px) {
    #xmas2026-topbar .xmas2026-topbar__offer {
        width: 310px;
        height: 27px;
    }
}
