/* Black Friday countdown bar (partials/sale-bar.php), first child of the fixed #header.
   Colours and hidden tiles key off data-phase so sale-bar.js can flip the phase in place. */

/* The bar grows the fixed header, so push in-flow content down by its height. */
body.has-sale-bar{
    --eo-sale-bar: 84px;
    padding-top: var(--eo-sale-bar);
}
/* Viewport-relative offsets do not move with the body padding. */
@media (min-width: 1024px){
    body.has-sale-bar .page-bundle .col-media{
        top: calc(124px + var(--eo-sale-bar));
    }
}

.eo-sale-bar{
    position: relative; /* holds .eo-sale-bar-link; the landing layout's fixed rule outranks this */
    background: #000;
    color: #fff;
    min-height: 84px;
    box-sizing: border-box;
    padding: 10px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 36px;
    font-family: 'Archivo', sans-serif;
    font-feature-settings: 'lnum';
}
/* Whole bar links to /products during the live sale; early bird keeps its own sign-up button. */
.eo-sale-bar-link{
    position: absolute;
    inset: 0;
}
.eo-sale-bar[data-phase="early_bird"] .eo-sale-bar-link{
    display: none;
}
.eo-sale-bar-head{
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.eo-sale-bar-title{
    font-family: 'Univers LT', sans-serif;
    font-weight: 900;
    font-size: 26px;
    line-height: 1;
    color: #FF4305;
    text-transform: uppercase;
}
.eo-sale-bar-sub,
.eo-sale-bar-note,
.eo-sale-bar-lead{
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
}
.eo-sale-bar-sub{
    display: none;
}
.eo-sale-bar-note{
    display: none;
    font-size: 13px;
    letter-spacing: 0.5px;
}
.eo-sale-bar-clock{
    display: flex;
    align-items: center;
    gap: 16px;
}
.eo-sale-bar-lead{
    font-size: 12px;
    letter-spacing: 1px;
}
.eo-sale-bar-timer{
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.eo-sale-bar-cell{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.eo-sale-bar-tile{
    background: #FF4305;
    color: #000;
    font-family: 'Univers LT', sans-serif;
    font-weight: 900;
    font-size: 30px;
    line-height: 1;
    width: 54px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.eo-sale-bar-unit{
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.2;
}
.eo-sale-bar-colon{
    font-family: 'Univers LT', sans-serif;
    font-weight: 900;
    font-size: 26px;
    line-height: 44px;
}

.eo-sale-bar[data-phase="final24"]{
    background: #FF4305;
    color: #000;
}
.eo-sale-bar[data-phase="final24"] .eo-sale-bar-title{
    color: #fff;
}
.eo-sale-bar[data-phase="final24"] .eo-sale-bar-note:not(:empty){
    display: block;
}
.eo-sale-bar[data-phase="final24"] .eo-sale-bar-tile{
    background: #000;
    color: #fff;
}
.eo-sale-bar[data-phase="early_bird"] .eo-sale-bar-tile{
    background: #fff;
    color: #000;
}
/* Early bird (design: CountdownBar isTeaser / isTeaserC). The early-only pieces hide by
   data-phase, so they go when sale-bar.js flips the bar to on_sale at the start time. */
.eo-sale-bar-white{
    color: #fff;
}
.eo-sale-bar-narrow,
.eo-sale-bar-early,
.eo-sale-bar-cta{
    display: none;
}
.eo-sale-bar[data-phase="early_bird"] .eo-sale-bar-early{
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-transform: uppercase;
}
.eo-sale-bar[data-phase="early_bird"] .eo-sale-bar-cta{
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 22px;
    box-sizing: border-box;
    background: #2404F2;
    border: 1px solid #2404F2;
    border-radius: 2px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}
.eo-sale-bar[data-phase="early_bird"] .eo-sale-bar-cta:hover,
.eo-sale-bar[data-phase="early_bird"] .eo-sale-bar-cta:focus{
    color: #fff;
    text-decoration: none;
}
.eo-sale-bar[data-phase="final24"] [data-unit="d"],
.eo-sale-bar[data-phase="final24"] .eo-sale-bar-colon[data-unit="h"],
.eo-sale-bar[data-phase="early_bird"] [data-unit="s"]{
    display: none;
}

@media (max-width: 767px){
    body.has-sale-bar{
        --eo-sale-bar: 64px;
    }
    .eo-sale-bar{
        height: 64px;
        min-height: 0;
        padding: 0 12px;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 10px;
    }
    .eo-sale-bar-head{
        gap: 3px;
        min-width: 0;
    }
    .eo-sale-bar-title{
        font-size: 19px;
    }
    .eo-sale-bar-sub{
        display: block;
        font-size: 10px;
        letter-spacing: 1px;
    }
    .eo-sale-bar-lead,
    .eo-sale-bar[data-phase="final24"] .eo-sale-bar-note:not(:empty){
        display: none;
    }
    .eo-sale-bar-timer{
        gap: 4px;
    }
    .eo-sale-bar-cell{
        gap: 2px;
    }
    .eo-sale-bar-tile{
        font-size: 21px;
        width: 38px;
        height: 34px;
    }
    .eo-sale-bar-unit{
        font-size: 8px;
    }
    .eo-sale-bar-colon{
        font-size: 18px;
        line-height: 34px;
    }
    .eo-sale-bar-wide,
    .eo-sale-bar[data-phase="early_bird"] .eo-sale-bar-early{
        display: none;
    }
    .eo-sale-bar-narrow{
        display: inline;
    }
    .eo-sale-bar[data-phase="early_bird"]{
        gap: 8px;
    }
    .eo-sale-bar[data-phase="early_bird"] .eo-sale-bar-title{
        font-size: 16px;
    }
    .eo-sale-bar[data-phase="early_bird"] .eo-sale-bar-sub{
        letter-spacing: 0.5px;
    }
    .eo-sale-bar[data-phase="early_bird"] .eo-sale-bar-timer{
        gap: 3px;
    }
    .eo-sale-bar[data-phase="early_bird"] .eo-sale-bar-tile{
        font-size: 18px;
        width: 32px;
        height: 30px;
    }
    .eo-sale-bar[data-phase="early_bird"] .eo-sale-bar-colon{
        font-size: 16px;
        line-height: 30px;
    }
    .eo-sale-bar[data-phase="early_bird"] .eo-sale-bar-cta{
        padding: 0 12px;
        border: 0;
        font-size: 11px;
    }
}

/* ---------- Ticker (partials/sale-ticker.php) ----------
   Strip pinned to the bottom of the screen for the live sale, on every page using
   partials/footer.php outside the purchase funnel. The page gets the same padding at the bottom so the footer
   is not hidden under it; :has() drops both when sale-bar.js removes the strip. */
@keyframes eoSaleTicker{from{transform:translateX(0)}to{transform:translateX(-50%)}}
body:has(.eo-sale-ticker){
    --eo-sale-ticker: 56px;
    padding-bottom: var(--eo-sale-ticker);
}
.eo-sale-ticker{
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60; /* over the page headers (10, 50-51), under the cookie card (99) and modals */
    height: 56px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: #FF4305;
    color: #000;
}
.eo-sale-ticker:hover,
.eo-sale-ticker:focus{
    color: #000;
    text-decoration: none;
}
.eo-sale-ticker-track{
    display: flex;
    flex-shrink: 0;
    white-space: nowrap;
    animation: eoSaleTicker 44s linear infinite;
    font-family: 'Univers LT', sans-serif;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
/* Other things pinned to the bottom sit on top of the strip, not under it. */
/* The Neo chat launcher lives in a shadow root; this variable inherits into it (ai-chat-widget/src/styles.css). */
body:has(.eo-sale-ticker){
    --aicw-bottom-offset: var(--eo-sale-ticker);
}
body:has(.eo-sale-ticker) #cookie-consent{
    bottom: calc(16px + var(--eo-sale-ticker));
}
body:has(.eo-sale-ticker) #product-intro .buy-now-box{
    bottom: calc(24px + var(--eo-sale-ticker));
}
body:has(.eo-sale-ticker) .eo-tri .tri-sticky,
body.eo-tri:has(.eo-sale-ticker) .tri-sticky{
    bottom: calc(28px + var(--eo-sale-ticker));
}
/* /swimbetter intro slider (layouts/product.php): fit the first screen under the countdown bar. */
body.has-sale-bar #product-intro.has-sale-offer .slider-img{
    min-height: calc(100vh - var(--eo-sale-bar));
}
@media (max-width: 767px){
    body:has(.eo-sale-ticker){
        --eo-sale-ticker: 40px;
    }
    .eo-sale-ticker{
        height: 40px;
    }
    .eo-sale-ticker-track{
        font-size: 14px;
    }
}
@media (prefers-reduced-motion: reduce){
    .eo-sale-ticker-track{
        animation: none;
    }
}
