/* Winter Sale banner, [winter_sale_timer] (christmas-page.php, srz_ws_timer_render()): the home
   page hero, same place and width as the Black November timer, in the Winter Sale colours.
   Text on the left with the title on one line, the button on the right, centred vertically (on a
   phone the button goes under the text). Frosted glass, a little falling snow and a soft snow line at the bottom. */

.srz-ws-timer {
    --wst-night: #0C141D;
    --wst-slate: #202C3A;
    --wst-ice: #A8DCFF;
    --wst-gold: var(--wst-orange);
    --wst-orange: var(--wp--preset--color--custom-galben, #ee9721);
    --wst-white: #FFFFFF;
    --wst-mist: #C6CED6;
    --wst-ink: #111111;
    --wst-line: rgba(168, 220, 255, 0.24);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "copy cta";
    align-items: center;
    gap: 20px 48px;
    box-sizing: border-box;
    width: 100%;
    max-width: 1100px;
    margin: 28px auto 0;
    padding: 24px 36px 28px;
    border: 1px solid var(--wst-line);
    border-radius: 28px;
    background:
        radial-gradient(ellipse 60% 80% at 0% 0%, rgba(168, 220, 255, 0.16), transparent 70%),
        linear-gradient(135deg, rgba(32, 44, 58, 0.82), rgba(12, 20, 29, 0.68));
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 24px 60px rgba(12, 20, 29, 0.45);
    color: var(--wst-white);
    font-family: var(--wp--preset--font-family--montserrat), system-ui, sans-serif;
    line-height: 1.35;
    text-align: left;
}

/* WordPress sets direct children of a constrained layout to the 1280px content width. The homepage search is 1100px. */
.is-layout-constrained > .srz-ws-timer {
    max-width: 1100px;
}

.srz-ws-timer[hidden] {
    display: none;
}

.srz-ws-timer *,
.srz-ws-timer *::before,
.srz-ws-timer *::after {
    box-sizing: border-box;
}

.srz-ws-timer p,
.srz-ws-timer ul {
    margin: 0;
}

/* Snow: a few slow flakes (a tiled pattern moved down by one tile, so it loops without a jump)
   and a soft snow line along the bottom edge. Behind the content, never clickable. */
.srz-ws-timer__snow {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.srz-ws-timer__snow::before {
    content: "";
    position: absolute;
    top: -160px;
    right: 0;
    bottom: 0;
    left: 0;
    background-image:
        radial-gradient(circle at 24px 30px, rgba(255, 255, 255, 0.85) 1.4px, transparent 2.4px),
        radial-gradient(circle at 96px 84px, rgba(255, 255, 255, 0.6) 1px, transparent 2px),
        radial-gradient(circle at 150px 22px, rgba(255, 255, 255, 0.75) 1.8px, transparent 2.8px),
        radial-gradient(circle at 62px 128px, rgba(255, 255, 255, 0.5) 1px, transparent 2px),
        radial-gradient(circle at 178px 112px, rgba(255, 255, 255, 0.65) 1.2px, transparent 2.2px);
    background-size: 200px 160px;
    opacity: 0.5;
    animation: srz-ws-timer-snow 16s linear infinite;
}

.srz-ws-timer__snow::after {
    content: "";
    position: absolute;
    right: -4%;
    bottom: -14px;
    left: -4%;
    height: 40px;
    background:
        radial-gradient(45% 100% at 12% 100%, rgba(255, 255, 255, 0.9), transparent 70%),
        radial-gradient(35% 85% at 46% 100%, rgba(255, 255, 255, 0.8), transparent 70%),
        radial-gradient(45% 100% at 86% 100%, rgba(255, 255, 255, 0.85), transparent 70%);
    filter: blur(3px);
    opacity: 0.45;
}

@keyframes srz-ws-timer-snow {
    to {
        transform: translateY(160px);
    }
}

.srz-ws-timer__copy {
    grid-area: copy;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.srz-ws-timer__kicker {
    color: var(--wst-white);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

/* The snowflake follows the last word, also when the line wraps. */
.srz-ws-timer__kicker svg {
    margin-left: 8px;
    color: var(--wst-ice);
    vertical-align: -3px;
}

.srz-ws-timer__title {
    font-size: clamp(30px, 3.6vw, 46px);
    font-weight: 900;
    letter-spacing: -0.01em;
    line-height: 1.05;
}

/* "Afara minus." and "Acasa plus." each stay whole: one line when there is room, two otherwise. */
.srz-ws-timer__half {
    white-space: nowrap;
}

.srz-ws-timer__title .is-ice {
    color: var(--wst-ice);
}

.srz-ws-timer__title .is-gold {
    color: var(--wst-gold);
}

.srz-ws-timer__lead {
    color: var(--wst-mist);
    font-size: 15px;
    font-weight: 500;
}

.srz-ws-timer .srz-ws-timer__cta {
    grid-area: cta;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 26px;
    border-radius: 999px;
    background: var(--wst-orange);
    color: var(--wst-ink);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s, transform 0.15s;
}

.srz-ws-timer .srz-ws-timer__cta:hover {
    background: var(--wst-gold);
    color: var(--wst-ink);
    transform: translateY(-1px);
}

.srz-ws-timer .srz-ws-timer__cta:focus-visible {
    outline: 3px solid var(--wst-ice);
    outline-offset: 3px;
}

.srz-ws-timer__cta svg {
    flex-shrink: 0;
    transition: transform 0.15s;
}

.srz-ws-timer__cta:hover svg {
    transform: translateX(3px);
}

/* Narrow screens: one column, the button under the text. */
@media (max-width: 900px) {
    .srz-ws-timer {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "copy"
            "cta";
    }

    .srz-ws-timer .srz-ws-timer__cta {
        justify-self: start;
    }
}

@media (max-width: 767px) {
    .srz-ws-timer {
        gap: 18px;
        margin-top: 20px;
        padding: 24px 18px 28px;
        border-radius: 22px;
    }

    .srz-ws-timer__kicker {
        font-size: 11px;
        letter-spacing: 0.16em;
    }

    .srz-ws-timer__kicker svg {
        margin-left: 6px;
    }

    .srz-ws-timer .srz-ws-timer__cta {
        justify-self: stretch;
        white-space: normal;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .srz-ws-timer__snow::before {
        animation: none;
    }

    .srz-ws-timer .srz-ws-timer__cta,
    .srz-ws-timer__cta svg {
        transition: none;
    }
}
