/* === IndezWeb Countdown Timer === */

/* Wrapper div holds relative positioning for close btn */
#iwct-bar-wrap {
    position: relative;
    z-index: 99999;
}

#iwct-bar {
    box-sizing: border-box;
    width: 100%;
    font-family: inherit;
    transition: transform .3s ease, opacity .3s ease;
}

#iwct-bar.iwct-sticky          { position: fixed; left: 0; right: 0; }
#iwct-bar.iwct-sticky.iwct-top { top: 0; }
#iwct-bar.iwct-sticky.iwct-bot { bottom: 0; }
#iwct-bar.iwct-static          { position: relative; }

body.iwct-pad-top { padding-top: var(--iwct-h, 0px); }
body.iwct-pad-bot { padding-bottom: var(--iwct-h, 0px); }

/* ── Close button ─────────────────────────────────────────── */
/* Lives INSIDE #iwct-bar so position:absolute works with fixed too */
.iwct-close {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    padding: 4px 8px;
    opacity: .75;
    transition: opacity .2s;
    color: inherit;
    line-height: 1;
    z-index: 1;
}
.iwct-close:hover { opacity: 1; }
#iwct-bar[dir="rtl"] .iwct-close { left: 8px;  right: auto; }
#iwct-bar[dir="ltr"] .iwct-close { right: 8px; left:  auto; }

/* ── Inner flex container ─────────────────────────────────── */
.iwct-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 36px;
    flex-wrap: nowrap;
}

/* ── Timer ────────────────────────────────────────────────── */
.iwct-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.iwct-unit {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid currentColor;
    border-radius: 7px;
    padding: 5px 10px;
    min-width: 48px;
    line-height: 1.15;
    background: rgba(255,255,255,.12);
}
.iwct-num   { font-weight: 800; letter-spacing: 1px; }
.iwct-label { opacity: .9; text-transform: lowercase; }
.iwct-sep   { font-weight: 800; line-height: 1; }

/* ── Text ─────────────────────────────────────────────────── */
.iwct-text { flex: 0 1 auto; min-width: 0; }
.iwct-title    { font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iwct-subtitle { opacity: .85; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Expired / hidden ─────────────────────────────────────── */
#iwct-bar.iwct-gone            { transform: translateY(-110%); opacity: 0; pointer-events: none; }
#iwct-bar.iwct-bot.iwct-gone   { transform: translateY(110%); }
#iwct-bar.iwct-expired .iwct-timer { display: none; }
.iwct-expired-msg              { font-weight: 600; }

/* ══════════════════════════════════════════════════════════
   MOBILE ≤ 600px — stack layout
   ══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {

    .iwct-inner {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 10px 32px;
        text-align: center;
    }

    /* close: sit at top of bar */
    .iwct-close {
        top: 8px;
        transform: none;
    }

    /* timer: row 1, full width */
    .iwct-timer {
        order: 1;
        width: 100%;
        justify-content: center;
        gap: 4px;
    }
    .iwct-unit {
        flex: 1 1 0;
        min-width: 0;
        max-width: 78px;
        padding: 4px 4px;
        border-radius: 6px;
    }
    .iwct-sep { font-size: 18px !important; }

    /* text: row 2, full width, wrap */
    .iwct-text {
        order: 2;
        width: 100%;
        text-align: center !important;
    }
    /* Keep inline font-size from JS — just allow wrapping */
    .iwct-title    { white-space: normal; overflow: visible; }
    .iwct-subtitle { white-space: normal; display: block; }

    .iwct-expired-msg { order: 3; width: 100%; text-align: center; }
}

@media (max-width: 400px) {
    .iwct-unit { padding: 3px 3px; }
    .iwct-sep  { font-size: 14px !important; }
}
