/**
 * GC Theme — Week in Numbers strip
 *
 * Thin white bar above the header top bar: "WEEK IN NUMBERS" label, up to
 * six figures, "Week 42 · October 13–19" on the right. Tablet shows the
 * first four figures; phone turns the figures into a swipeable row and
 * hides the date.
 *
 * Markup in inc/week-numbers.php.
 *
 * @package GC_Theme
 */

.gc-wn {
    background: var(--gc-bg);
    border-bottom: 1px solid var(--gc-border);
}

.gc-wn .container {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 34px;
    padding: 0 30px; /* same gutter as .header-top-bar .container */
}

.gc-wn__label {
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1;
    color: var(--gc-primary); /* same teal as the Subscribe to Briefing button */
}

.gc-wn__stats {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.gc-wn__stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    line-height: 1;
    color: var(--gc-text-muted);
    white-space: nowrap;
}

.gc-wn__n {
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    color: var(--gc-navy);
}

.gc-wn__d {
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.gc-wn__d.is-up   { color: var(--gc-primary); }
.gc-wn__d.is-down { color: var(--gc-danger); }

.gc-wn__range {
    margin-left: auto;
    flex-shrink: 0;
    line-height: 1;
    font-size: 11px;
    color: var(--gc-text-faint);
    white-space: nowrap;
}

/* Every piece sits in a 34px flex box, centred, so font metrics
   (Sora vs Inter, caps vs lowercase) cannot shift any item up or down. */
.gc-wn__label,
.gc-wn__stat,
.gc-wn__range {
    display: inline-flex;
    align-items: center;
    height: 34px;
    align-self: center;
}

.gc-wn__stat > * {
    line-height: 1;
    vertical-align: middle;
}

/* ─── Dark mode ─── */
[data-theme="dark"] .gc-wn__d.is-down {
    color: #F87171;
}

/* ─── Responsive ─── */
/* Tablet: first four figures (.gc-wn__iN = position, set in PHP). */
@media (max-width: 1100px) {
    .gc-wn__i5,
    .gc-wn__i6 {
        display: none;
    }
}

/* Phone: all figures in a swipeable row, date hidden, label stays. */
@media (max-width: 720px) {
    .gc-wn .container {
        gap: 14px;
        height: 32px;
        padding: 0 16px;
    }
    .gc-wn__label {
        font-size: 10px;
    }
    .gc-wn__stats {
        gap: 16px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x;
        scrollbar-width: none;
        /* fade on the right edge hints there is more to swipe */
        -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
                mask-image: linear-gradient(90deg, #000 85%, transparent);
        padding-right: 24px;
    }
    .gc-wn__stats::-webkit-scrollbar {
        display: none;
    }
    .gc-wn__i5,
    .gc-wn__i6 {
        display: inline-flex;
    }
    .gc-wn__range {
        display: none;
    }
    .gc-wn__label,
    .gc-wn__stat { height: 32px; }
    .gc-wn__stat { font-size: 11px; }
    .gc-wn__n    { font-size: 12px; }
}