/* ── CB Xmas Countdown — Christmas 2026 campaign skin of the WC nav tile ──
   Colours and type from the CDS xmas26 campaign layer: canvas #8E1229, coral #E8475F,
   pink #F6CFD5, text #F8F2FF, lime #DFFD51. Midnight Sans ST Heavy, caps, for the
   main line and the countdown numerals; Inter for the small label. */

@font-face {
    font-family: 'CBXC Midnight';
    src: url('../fonts/midnight-sans-st-48-heavy-pro.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@keyframes cbxc-slide-in {
    from { transform: translateX(calc(100% + 24px)); opacity: 0; }
    to   { transform: translateX(0);                 opacity: 1; }
}

@keyframes cbxc-slide-up {
    from { transform: translateY(calc(100% + 12px)); opacity: 0; }
    to   { transform: translateY(0);                 opacity: 1; }
}

#cbxc-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    width: 260px;
    animation: cbxc-slide-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) 1.2s both;
}

/* Mobile — capped width bar, slides up */
@media (max-width: 768px) {
    #cbxc-widget {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        max-width: 320px;
        animation: cbxc-slide-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 1.2s both;
    }
}

/* ── Tile link ─────────────────────────────────────── */
#cbxc-widget a {
    display: flex;
    align-items: center;
    height: 68px;
    border-radius: 12px;
    border: 1px solid rgba(246, 207, 213, 0.35);
    background: #8E1229;
    overflow: visible;      /* the enlarged Santa may pass the edge; the streaks clip themselves */
    position: relative;
    text-decoration: none !important;
    transition: background-color 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
}

/* Hover: the crimson deepens; Santa grows slightly (below) */
#cbxc-widget a:hover,
#cbxc-widget a:focus-visible {
    background: #7A0F22;
    border-color: rgba(246, 207, 213, 0.6);
    text-decoration: none !important;
}

#cbxc-widget a:focus-visible {
    outline: 2px solid #F6CFD5;
    outline-offset: 2px;
}

/* ── Background: coral perspective brandmark ──────── */
.cbxc-bg {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    background-image: url('../img/xmas-bg.svg');
    background-size: auto 170%;
    background-repeat: no-repeat;
    background-position: right -10px center;
    opacity: 0.16;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 0;
}

#cbxc-widget a:hover .cbxc-bg {
    opacity: 0.24;
}

/* ── Icon: Santa on the sleigh; grows slightly on hover ─ */
.cbxc-logo-wrap {
    width: 64px;
    margin: 0 6px 0 6px;
    flex-shrink: 0;
    align-self: stretch;
    position: relative;
    z-index: 1;
}

.cbxc-logo-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 46px;
    max-width: 48px;
    width: auto;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

#cbxc-widget a:hover .cbxc-logo-img,
#cbxc-widget a:focus-visible .cbxc-logo-img {
    transform: translate(-50%, -50%) scale(1.1);
}

/* ── Content: a small label over one main line ────── */
.cbxc-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    padding: 0 4px 0 0;
    gap: 4px;
    position: relative;
    z-index: 1;
    transition: opacity 0.25s ease;
}

.cbxc-content.cbxc-fade {
    opacity: 0;
}

/* Label: Inter, caps, tracked, pink */
.cbxc-eyebrow {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #F6CFD5;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main line: Midnight Sans, caps, white; the countdown uses the same face */
.cbxc-main {
    display: block;
    font-family: 'CBXC Midnight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 800;
    font-size: 16px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    color: #F8F2FF;
    white-space: nowrap;
    overflow: hidden;
}

.cbxc-amount,
.cbxc-cta {
    color: #DFFD51;
}

/* Countdown: Midnight numerals, small Inter units */
.cbxc-unit {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    margin-right: 6px;
}

/* Host themes sometimes set min-width:0 or flex-shrink on everything: keep the tile's own layout */
#cbxc-widget .cbxc-logo-wrap,
#cbxc-widget .cbxc-chev,
#cbxc-widget .cbxc-live-dot,
#cbxc-widget .cbxc-unit {
    flex-shrink: 0;
}

#cbxc-widget .cbxc-eyebrow > span {
    flex-shrink: 0;
}

.cbxc-num {
    font-variant-numeric: tabular-nums;
    color: #DFFD51;
}

.cbxc-unit-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #F6CFD5;
}

/* Live dot, in the label */
@keyframes cbxc-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

.cbxc-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #DFFD51;
    flex-shrink: 0;
    animation: cbxc-pulse 4s ease-in-out infinite;
    display: inline-block;
}

/* ── Chevron ───────────────────────────────────────── */
.cbxc-chev {
    display: flex;
    align-items: center;
    padding: 0 16px 0 8px;
    flex-shrink: 0;
    font-size: 18px;
    color: #F6CFD5;
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .cbxc-content { transition: none; }
    #cbxc-widget, .cbxc-live-dot { animation: none !important; }
    #cbxc-widget .cbxc-logo-img { transition: none; }
}
