/* SST Sale Countdown Popup v2.5.0 (r7: newsletter opt-in under the modal CTA) */

/* ---------- Top bar ---------- */

.sst-cdbar[hidden],
.sst-cdmodal[hidden] {
    display: none !important;
}

.sst-cdbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    padding: 5px 8px;
    background: #121212;
    color: #ffffff;
    font-family: var(--sst-font, "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
}

.sst-cdbar__inner {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 12px;
    min-width: 0;
    font-size: 13px;
    line-height: 1.3;
}

.sst-cdbar__flash {
    font-size: 14px;
}

.sst-cdbar__label {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sst-cdbar__timer-wrap {
    color: #d7d7d7;
    white-space: nowrap;
}

.sst-cdbar__timer {
    display: inline-block;
    min-width: 70px;
    color: #ff6b6b;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.sst-cdbar__cta {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 14px;
    background: #ef4444;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
    white-space: nowrap;
}

.sst-cdbar__cta:hover,
.sst-cdbar__cta:focus {
    background: #dc2626;
    color: #ffffff;
    text-decoration: none;
}

.sst-cdbar__close {
    flex: 0 0 auto;
    margin-left: 4px;
    border: 0;
    border-radius: 4px;
    padding: 6px 8px;
    background: transparent;
    color: #9a9a9a;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}

.sst-cdbar__close:hover {
    color: #ffffff;
}

/* Push the sticky theme header below the bar while the bar is visible. */
body.sst-cdbar-on .sst-header {
    top: 42px;
}

@media (max-width: 640px) {
    .sst-cdbar__label {
        display: none;
    }

    .sst-cdbar__inner {
        font-size: 12px;
        gap: 4px 8px;
    }

    body.sst-cdbar-on .sst-header {
        top: 40px;
    }
}

/* ---------- Center modal ---------- */

.sst-cdmodal {
    position: fixed;
    inset: 0;
    z-index: 1900;
    display: grid;
    place-items: center;
    padding: clamp(12px, 3vw, 24px);
    font-family: var(--sst-font, "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
}

.sst-cdmodal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 14, 18, 0.66);
}

.sst-cdmodal__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    box-sizing: border-box;
    width: min(92vw, 460px);
    border-radius: 14px;
    padding: clamp(22px, 4vw, 34px) clamp(18px, 4vw, 30px);
    background: #ffffff;
    color: #121212;
    text-align: center;
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.4);
    border-top: 5px solid #ef4444;
}

.sst-cdmodal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    border-radius: 6px;
    padding: 8px 10px;
    background: transparent;
    color: #8a8a8a;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.sst-cdmodal__close:hover {
    color: #121212;
}

.sst-cdmodal__eyebrow {
    margin: 0;
    color: #ef4444;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.sst-cdmodal__title {
    margin: 0;
    font-size: clamp(20px, 3.4vw, 26px);
    font-weight: 800;
    line-height: 1.25;
}

.sst-cdmodal__deadline {
    margin: 0;
    color: #5f5f5f;
    font-size: 14px;
    font-weight: 600;
}

.sst-cdmodal__timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 4px 0;
}

.sst-cdmodal__cell {
    display: grid;
    gap: 3px;
    min-width: 64px;
    border-radius: 10px;
    padding: 10px 6px 8px;
    background: #121212;
    color: #ffffff;
}

.sst-cdmodal__num {
    font-size: clamp(26px, 5vw, 34px);
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.sst-cdmodal__unit {
    color: #b9b9b9;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.sst-cdmodal__sep {
    color: #cfcfcf;
    font-size: 24px;
    font-weight: 800;
}

.sst-cdmodal__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px auto 0;
    border-radius: 999px;
    padding: 13px 34px;
    background: #ef4444;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(239, 68, 68, 0.35);
}

.sst-cdmodal__cta:hover,
.sst-cdmodal__cta:focus {
    background: #dc2626;
    color: #ffffff;
    text-decoration: none;
}

/* ---------- Modal video (top of the card, 16:9) ---------- */

/* Mobile: centered portrait card, full 9:16 frame, height-capped. */
.sst-cdmodal__dialog--video .sst-cdmodal__media {
    position: relative;
    justify-self: center;
    width: min(100%, calc(46vh * 9 / 16));
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.sst-cdmodal__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.sst-cdmodal__mute {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}

.sst-cdmodal__mute:hover {
    background: rgba(0, 0, 0, 0.75);
}

/* The close button sits on top of the video — keep it legible. */
.sst-cdmodal__dialog--video .sst-cdmodal__close {
    z-index: 2;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
}

.sst-cdmodal__dialog--video .sst-cdmodal__close:hover {
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
}

.sst-cdmodal__body {
    display: grid;
    gap: 14px;
}

/* The opt-in block made the card taller. Scroll the overlay, never the card:
   capping the card's height would squeeze its grid rows and the video pane
   (sized by aspect-ratio) would then overlap the copy beneath it.
   "safe center" keeps the top of an over-tall card reachable. */
.sst-cdmodal {
    overflow-y: auto;
    align-content: safe center;
    justify-content: safe center;
}

/* Desktop: split card — full-frame 9:16 video pane on the left, sale copy
   + countdown on the right at exactly the same width (1:1 columns). Column
   width × height pairs keep the video frame exact 9:16, never cropped. */
@media (min-width: 721px) {
    .sst-cdmodal__dialog--video {
        width: min(94vw, 680px);
        grid-template-columns: 1fr 1fr;
        gap: 0;
        padding: 0;
    }

    .sst-cdmodal__dialog--video .sst-cdmodal__media {
        justify-self: stretch;
        width: auto;
        height: 604px; /* 340px x 16/9 — exact 9:16 */
        aspect-ratio: auto;
        border-radius: 9px 0 0 9px;
    }

    .sst-cdmodal__dialog--video .sst-cdmodal__body {
        padding: clamp(20px, 3vw, 28px) 16px;
        align-content: center;
        gap: 12px;
        overflow-y: auto;
    }

    /* The split card is a fixed-height pair of columns; the video pane keeps
       its exact 9:16 frame, so only the copy pane scrolls. */
    .sst-cdmodal__dialog--video {
        overflow: hidden;
    }

    .sst-cdmodal__dialog--video .sst-cdmodal__media {
        align-self: stretch;
    }

    /* Fit the 4-cell countdown into the narrower 340px pane. */
    .sst-cdmodal__dialog--video .sst-cdmodal__cell {
        min-width: 56px;
    }
}

@media (min-width: 721px) and (max-height: 800px) {
    .sst-cdmodal__dialog--video {
        width: min(94vw, 600px);
    }

    .sst-cdmodal__dialog--video .sst-cdmodal__media {
        height: 533px; /* 300px x 16/9 */
    }
}

@media (min-width: 721px) and (max-height: 680px) {
    .sst-cdmodal__dialog--video {
        width: min(94vw, 512px);
    }

    .sst-cdmodal__dialog--video .sst-cdmodal__media {
        height: 455px; /* 256px x 16/9 */
    }
}

/* ---------- Newsletter opt-in (under the sale CTA) ---------- */

.sst-cdnl[hidden],
.sst-cdnl__field[hidden],
.sst-cdnl__as[hidden],
.sst-cdnl__note[hidden],
.sst-cdnl__msg[hidden],
.sst-cdnl__form[hidden] {
    display: none !important;
}

.sst-cdnl {
    display: grid;
    gap: 7px;
    margin-top: 2px;
    border-top: 1px solid #ececec;
    padding-top: 12px;
    text-align: center;
}

.sst-cdnl__lead {
    margin: 0;
    color: #3f3f3f;
    font-size: 13px;
    font-weight: 700;
}

.sst-cdnl__form {
    display: grid;
    gap: 7px;
}

.sst-cdnl__field {
    display: block;
}

/* Own visually-hidden helper — do not depend on the theme's
   .screen-reader-text being loaded here. */
.sst-cdnl__srt {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.sst-cdnl__input {
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    margin: 0;
    border: 1px solid #d4d4d4;
    border-radius: 8px;
    padding: 0 12px;
    background: #ffffff;
    color: #121212;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.2;
}

.sst-cdnl__input:focus {
    border-color: #121212;
    outline: 2px solid rgba(18, 18, 18, 0.12);
    outline-offset: 1px;
}

.sst-cdnl__as {
    margin: 0;
    color: #6f6f6f;
    font-size: 12px;
    word-break: break-all;
}

/* Honeypot — off-screen for humans, still fillable by bots. */
.sst-cdnl__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.sst-cdnl__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    border: 1.5px solid #121212;
    border-radius: 999px;
    padding: 0 18px;
    background: #ffffff;
    color: #121212;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.sst-cdnl__btn:hover:not(:disabled),
.sst-cdnl__btn:focus:not(:disabled) {
    background: #121212;
    color: #ffffff;
}

.sst-cdnl__btn:disabled {
    border-color: #c9c9c9;
    color: #9a9a9a;
    cursor: default;
}

.sst-cdnl__note {
    margin: 0;
    color: #8a8a8a;
    font-size: 11px;
    line-height: 1.4;
}

.sst-cdnl__msg {
    margin: 0;
    color: #1a7f4b;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.4;
}

.sst-cdnl__msg--error {
    color: #d13b3b;
}

.sst-cdnl--done {
    padding-top: 14px;
}

/* Stacked mobile card: drop the lead line so the whole popup still fits
   without scrolling. The button label and the note carry the same message. */
@media (max-width: 720px) {
    .sst-cdnl {
        gap: 6px;
        padding-top: 10px;
    }

    .sst-cdnl__lead {
        display: none;
    }
}

body.sst-cdmodal-open {
    overflow: hidden;
}

@media (max-width: 420px) {
    .sst-cdmodal__cell {
        min-width: 54px;
    }
}
