/************** holiday-2026 flash sale banner **************/
/* Markup: templates/common/holiday_2026_banner.html
   Design: Figma "Tweet Eraser - Holiday Sale Banner", EN Desktop 19809:2447 (1859x89) and
   EN Mobile 19809:2370 (430x70).

   Sizes are Figma pixels times --u, so the Figma numbers can be read straight from this file.
   The outer banner is a size container: the layout follows the banner's own width (on dashboard
   pages that is the viewport minus the sidebar), not the viewport.

   Scoping rule: cqw units and @container rules only reach DESCENDANTS of the container. So
   .hol2026-banner itself holds nothing that depends on --u, cqw or a container query; all of
   that lives on .hol2026-inner and .hol2026-close.

   Mobile-first: a browser without container queries gets the mobile layout at every width. */

/* 1. Reset. /now/search/ loads neither Bootstrap nor style.css. */
.hol2026-banner *,
.hol2026-banner *::before,
.hol2026-banner *::after {
    box-sizing: border-box;
}
.hol2026-form,
.hol2026-banner .hol2026-hit,
.hol2026-banner .hol2026-close {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
}

/* 2. Container. The colour shows through wherever the artwork does not reach. */
.hol2026-banner {
    position: relative;
    z-index: 5;
    container: hol2026 / inline-size;
    background-color: #00142a;
    color: #fff;
}

/* The whole strip is the click target: an overlay link, or the X sign-in form's button.
   .hol2026-inner stays unpositioned so this paints above it. */
.hol2026-banner .hol2026-hit {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    cursor: pointer;
}
.hol2026-banner .hol2026-hit:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
}

/* 3. Default: Figma Mobile (container width <= 600) */
.hol2026-inner,
.hol2026-close {
    --u: 1px;
}
.hol2026-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    column-gap: calc(15 * var(--u));
    min-height: calc(70 * var(--u));
    /* 4u, so a two-line headline beside the pill (60.1u of copy) still fits the 70u banner */
    padding-top: calc(4 * var(--u));
    padding-bottom: calc(4 * var(--u));
    /* 20px at 430 wide. The copy is centred between this padding and the timer, which puts the
       English copy at x = 33 as in Figma. The first line is for browsers without cqw. No var()
       in the second line, or such a browser would accept it and then compute it to 0. */
    padding-left: 20px;
    padding-left: clamp(10px, 4.65cqw, 20px);
    padding-right: calc((47 + 16) * var(--u)); /* close button + gap */
    font-family: "Source Sans Pro", "DM Sans", sans-serif;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-align: center;
    background-image: url("../../img/flash_banner/holiday2026-bg-mobile.8eec55b1f1b7.webp");
    background-image: -webkit-image-set(url("../../img/flash_banner/holiday2026-bg-mobile.8eec55b1f1b7.webp") 1x, url("../../img/flash_banner/holiday2026-bg-mobile@2x.f22647e92adf.webp") 2x);
    background-image: image-set(url("../../img/flash_banner/holiday2026-bg-mobile.8eec55b1f1b7.webp") 1x, url("../../img/flash_banner/holiday2026-bg-mobile@2x.f22647e92adf.webp") 2x);
    background-repeat: no-repeat;
    background-size: auto 100%;
    /* The 945px strip sits at x = -159 in the 430 frame. The second line is the same offset
       (159 / 945 = 16.825%) but it follows the artwork when a wrapped headline makes the banner
       taller, so the zoomed tree never slides in under the copy. No var(): see padding-left. */
    background-position: -159px center;
    background-position: calc(16.825% - 16.825cqw) center;
}
.hol2026-copy {
    display: flex;
    flex: 0 1 auto; /* shrink-wrapped, so the gold pill is centred under row one */
    flex-direction: column;
    gap: calc(6 * var(--u));
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
}
/* Row one does not wrap: the pill keeps its place and the headline wraps as text beside it,
   as in the Figma ES/PT/DE mobile frames. */
.hol2026-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: calc(6 * var(--u));
    min-width: 0;
}
.hol2026-pill,
.hol2026-offer {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(23.6 * var(--u));
    padding: calc(2 * var(--u)) calc(12 * var(--u));
    border-radius: calc(86 * var(--u));
    font-size: calc(11 * var(--u));
    white-space: nowrap;
}
.hol2026-pill {
    flex: none;
    background-color: #0d99f5;
    color: #fff;
}
.hol2026-offer {
    align-self: center;
    padding-left: calc(12.6 * var(--u));
    padding-right: calc(12.6 * var(--u));
    background-color: #ebc158;
    color: #172c3e;
}
.hol2026-headline {
    flex: 0 1 auto;
    min-width: 0;
    font-size: calc(12.2 * var(--u));
    text-align: center;
    text-wrap: balance;
    white-space: normal;
    overflow-wrap: anywhere; /* last resort for machine-translated strings */
}
.hol2026-timer {
    display: flex;
    flex: none;
    align-items: flex-start;
    gap: calc(9 * var(--u));
}
.hol2026-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(2 * var(--u));
}
.hol2026-digits {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(27.945 * var(--u));
    height: calc(24.452 * var(--u));
    border: max(0.5px, calc(0.55 * var(--u))) solid #fff;
    border-radius: calc(3.725 * var(--u));
    background-color: #00a4f9;
    font-size: calc(14 * var(--u));
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: 0;
}
.hol2026-label {
    font-size: calc(8.384 * var(--u));
    font-weight: 600;
    line-height: calc(13.973 * var(--u));
    white-space: nowrap;
}

/* Close: red square on the right edge, as tall as the banner, above the click target.
   Figma draws a white inside stroke on its left edge; it is left out on request. */
.hol2026-banner .hol2026-close {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(47 * var(--u));
    background-color: #e01440;
    cursor: pointer;
}
.hol2026-banner .hol2026-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}
.hol2026-close img {
    display: block;
    width: calc(15.83 * var(--u));
    height: auto;
}

/* 3b. Narrow wrap state. Below the width where even a two-line headline cannot sit beside the
   pill, row one wraps, pill text may wrap, and the artwork anchor moves so the snowflake is
   off-canvas. Thresholds are per language (keyed on <html lang>), measured with the marketing
   sheet strings in both page fonts (Source Sans Pro, and DM Sans on /now/search/). */
@container hol2026 (width < 352px) {
    .hol2026-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    .hol2026-pill, .hol2026-offer {
        white-space: normal;
    }
    .hol2026-pill {
        flex-shrink: 1;
        min-width: 0;
    }
    .hol2026-inner {
        background-position: calc(19.5% - 19.5cqw) center;
    }
}
@container hol2026 (width < 360px) {
    html[lang|="ar"] .hol2026-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    html[lang|="ar"] .hol2026-pill,
    html[lang|="ar"] .hol2026-offer {
        white-space: normal;
    }
    html[lang|="ar"] .hol2026-pill {
        flex-shrink: 1;
        min-width: 0;
    }
    html[lang|="ar"] .hol2026-inner {
        background-position: calc(19.5% - 19.5cqw) center;
    }
}
@container hol2026 (width < 373px) {
    html[lang|="fr"] .hol2026-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    html[lang|="fr"] .hol2026-pill,
    html[lang|="fr"] .hol2026-offer {
        white-space: normal;
    }
    html[lang|="fr"] .hol2026-pill {
        flex-shrink: 1;
        min-width: 0;
    }
    html[lang|="fr"] .hol2026-inner {
        background-position: calc(19.5% - 19.5cqw) center;
    }
}
@container hol2026 (width < 378px) {
    html[lang|="es"] .hol2026-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    html[lang|="es"] .hol2026-pill,
    html[lang|="es"] .hol2026-offer {
        white-space: normal;
    }
    html[lang|="es"] .hol2026-pill {
        flex-shrink: 1;
        min-width: 0;
    }
    html[lang|="es"] .hol2026-inner {
        background-position: calc(19.5% - 19.5cqw) center;
    }
}
@container hol2026 (width < 389px) {
    html[lang|="it"] .hol2026-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    html[lang|="it"] .hol2026-pill,
    html[lang|="it"] .hol2026-offer {
        white-space: normal;
    }
    html[lang|="it"] .hol2026-pill {
        flex-shrink: 1;
        min-width: 0;
    }
    html[lang|="it"] .hol2026-inner {
        background-position: calc(19.5% - 19.5cqw) center;
    }
}
@container hol2026 (width < 397px) {
    html[lang|="de"] .hol2026-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    html[lang|="de"] .hol2026-pill,
    html[lang|="de"] .hol2026-offer {
        white-space: normal;
    }
    html[lang|="de"] .hol2026-pill {
        flex-shrink: 1;
        min-width: 0;
    }
    html[lang|="de"] .hol2026-inner {
        background-position: calc(19.5% - 19.5cqw) center;
    }
}
@container hol2026 (width < 421px) {
    html[lang|="pt"] .hol2026-row,
    html[lang|="br"] .hol2026-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    html[lang|="pt"] .hol2026-pill,
    html[lang|="br"] .hol2026-pill,
    html[lang|="pt"] .hol2026-offer,
    html[lang|="br"] .hol2026-offer {
        white-space: normal;
    }
    html[lang|="pt"] .hol2026-pill,
    html[lang|="br"] .hol2026-pill {
        flex-shrink: 1;
        min-width: 0;
    }
    html[lang|="pt"] .hol2026-inner,
    html[lang|="br"] .hol2026-inner {
        background-position: calc(19.5% - 19.5cqw) center;
    }
}

/* 3c. From 456 up the copy is left-aligned at the Figma 33px and the timer sits next to the
   close button. */
@container hol2026 (min-width: 456px) {
    .hol2026-inner {
        padding-left: 33px;
    }
    .hol2026-copy {
        margin-left: 0;
        margin-right: 0;
    }
    .hol2026-timer {
        margin-left: auto;
    }
}

/* 4. Tablet (601 to 959): mobile arrangement, scaled, left-aligned, on the mobile artwork
   scaled to cover the width */
@container hol2026 (min-width: 601px) {
    .hol2026-inner,
    .hol2026-close {
        --u: 1.15px;
    }
    .hol2026-inner {
        padding-left: calc(33 * var(--u));
        background-size: max(155cqw, calc(945 * var(--u))) auto;
        background-position: calc(16.825% - 16.825cqw) center;
    }
    .hol2026-copy {
        margin-left: 0;
        margin-right: 0;
    }
    .hol2026-timer {
        margin-left: auto;
    }
}

/* 5. Desktop (>= 960): Figma Desktop, centred. --u is 1 at 1859 wide and never below 0.632. */
@container hol2026 (min-width: 960px) {
    .hol2026-inner,
    .hol2026-close {
        /* About 62px tall with 20px copy from 1050px up, instead of scaling up with the Figma
           1859px frame; eases down to 56px / 18px at 960 so long translations stay on one row. */
        --u: clamp(0.632px, calc(100cqw / 1500), 0.7px);
    }
    .hol2026-inner {
        justify-content: center;
        column-gap: calc(43 * var(--u));
        min-height: calc(89 * var(--u));
        padding-top: calc(8 * var(--u));
        padding-bottom: calc(8 * var(--u));
        /* the same on both sides, so the content stays centred and clear of the close button */
        padding-left: calc((89 + 16) * var(--u));
        padding-right: calc((89 + 16) * var(--u));
        font-size: calc(28.5 * var(--u));
        line-height: calc(35.6 * var(--u));
        background-image: url("../../img/flash_banner/holiday2026-bg-desktop.ccf8a660cc00.webp");
        background-image: -webkit-image-set(url("../../img/flash_banner/holiday2026-bg-desktop.ccf8a660cc00.webp") 1x, url("../../img/flash_banner/holiday2026-bg-desktop@2x.1b467ec069e8.webp") 2x);
        background-image: image-set(url("../../img/flash_banner/holiday2026-bg-desktop.ccf8a660cc00.webp") 1x, url("../../img/flash_banner/holiday2026-bg-desktop@2x.1b467ec069e8.webp") 2x);
        /* The artwork (1770x89, without the Figma frame's close-button area) ends at the close
           button: it spans the banner minus the close square, and never draws shorter than the
           banner, so on narrower desktops its left end is cropped instead. */
        background-repeat: no-repeat;
        background-color: #003c8e; /* the artwork's plain blue, for a banner taller than the artwork */
        background-size: cover;
        background-size: max(calc(1770 * var(--u)), calc(100cqw - 89 * var(--u))) auto;
        background-position: right calc(89 * var(--u)) center;
    }
    .hol2026-copy {
        flex: 0 1 auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: calc(15.5 * var(--u));
    }
    .hol2026-row {
        flex-wrap: wrap; /* long headlines make the banner taller instead of overflowing */
        justify-content: center;
        gap: calc(15.5 * var(--u));
    }
    .hol2026-pill,
    .hol2026-offer {
        min-height: calc(61 * var(--u));
        padding: 0 calc(30.5 * var(--u));
        font-size: inherit;
        white-space: nowrap;
    }
    .hol2026-offer {
        align-self: auto;
        padding-left: calc(33 * var(--u));
        padding-right: calc(33 * var(--u));
    }
    .hol2026-headline {
        font-size: inherit;
        overflow-wrap: normal;
    }
    .hol2026-timer {
        margin-left: 0;
        gap: calc(13 * var(--u));
    }
    .hol2026-unit {
        gap: 0;
    }
    .hol2026-digits {
        width: calc(40 * var(--u));
        height: calc(35 * var(--u));
        font-size: calc(20 * var(--u));
    }
    .hol2026-label {
        font-size: max(10px, calc(12 * var(--u)));
        font-weight: 700;
        line-height: calc(20 * var(--u));
    }
    .hol2026-banner .hol2026-close {
        width: calc(89 * var(--u));
    }
    .hol2026-close img {
        width: calc(26.76 * var(--u));
    }
}

/* 6. Dashboard pages: keep clear of the fixed left sidebar */
@media (min-width: 768px) {
    body:has(.tw-eraser-dashboard-left-sidebar) .hol2026-banner {
        margin-left: 22%; /* sidebar width in style.css */
    }
}

/* 7. Translated copy: each phrase sets its own direction; letter-spacing breaks Arabic joining */
.hol2026-pill,
.hol2026-headline,
.hol2026-offer,
.hol2026-label {
    unicode-bidi: plaintext;
}
html[lang|="ar"] .hol2026-inner {
    letter-spacing: 0;
}
/* Narrower desktops: the centred countdown reaches the right-hand artwork (lights, snowflake,
   tree), so it gets a plate in the artwork's blue to keep the labels readable. The plate is a
   background plus a spread shadow, so it takes no layout space. */
@container hol2026 (min-width: 960px) and (max-width: 1299px) {
    .hol2026-timer {
        border-radius: calc(4 * var(--u));
        background-color: rgba(0, 60, 142, 0.92);
        box-shadow: 0 0 0 calc(8 * var(--u)) rgba(0, 60, 142, 0.92);
    }
}

/* Windows high-contrast mode would repaint the close square and hide its white X */
@media (forced-colors: active) {
    .hol2026-banner .hol2026-close {
        forced-color-adjust: none;
    }
}

/* Hangul may break between any two syllables; keep Korean words whole when the headline wraps */
html[lang|="ko"] .hol2026-headline {
    word-break: keep-all;
}
/************** holiday-2026 flash sale banner end **************/
