/* ==========================================================================
   AfCRA Live — Sovereign Pulse
   Page-specific presentation.
   Research Wheel styling remains sourced from afcra.css.
   ========================================================================== */


/* ==========================================================================
   PAGE
   ========================================================================== */

.afcra-live-page {
    --live-background: #031426;
    --live-background-deep: #020e1b;
    --live-panel: #08253f;
    --live-border: #24506f;
    --live-text: #f7f9fc;
    --live-muted: #9db4c8;
    --live-cyan: #43d6dd;
    --live-gold: #e8ad38;
    --live-green: #69d7a5;

    min-height: 100vh;
    padding: 28px 0 70px;

    background:
        radial-gradient(
            circle at 82% 2%,
            rgba(27, 91, 133, 0.55) 0,
            transparent 34%
        ),
        radial-gradient(
            circle at 8% 92%,
            rgba(232, 173, 56, 0.08) 0,
            transparent 28%
        ),
        linear-gradient(
            145deg,
            var(--live-background-deep),
            var(--live-background)
        );

    color: var(--live-text);
}

.afcra-live-wrapper {
    width: min(1500px, 95vw);
    margin: 0 auto;
    padding: 0 24px;
}


/* ==========================================================================
   TOP BAR
   ========================================================================== */

.afcra-live-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.afcra-live-wordmark {
    font-size: 22px;
    font-weight: 800;
}

.afcra-live-wordmark span {
    color: var(--live-cyan);
}

.afcra-live-status {
    color: var(--live-green);
    font-size: 13px;
    letter-spacing: 0.04em;
}

.afcra-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--live-green);
    box-shadow: 0 0 12px var(--live-green);
    animation: afcraLivePulse 1s infinite;
}

@keyframes afcraLivePulse {
    50% {
        opacity: 0.35;
    }
}


/* ==========================================================================
   COUNTRY HERO
   ========================================================================== */

.afcra-live-hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin: 34px 0 18px;
}

.afcra-live-country {
    margin: 0;
    color: var(--live-text);
    font-size: clamp(40px, 5vw, 76px);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
}

.afcra-live-meta,
.afcra-live-clock {
    color: var(--live-muted);
}

.afcra-live-meta {
    margin-top: 7px;
}

.afcra-live-clock {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.afcra-live-section-label {
    margin-bottom: 10px;
    color: var(--live-muted);
    font-size: 13px;
    letter-spacing: 0.06em;
}


/* ==========================================================================
   ECONOMIC BAROMETER METRICS
   ========================================================================== */

.afcra-live-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.afcra-live-page .metric-card {
    min-height: 135px;
    padding: 18px;

    border: 1px solid var(--live-border);
    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            rgba(13, 49, 82, 0.96),
            rgba(5, 28, 49, 0.96)
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.afcra-live-page .metric-label {
    color: var(--live-muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.afcra-live-page .metric-value {
    margin: 12px 0 5px;
    color: var(--metric-accent, var(--live-cyan));
    font-size: 36px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 18px var(--metric-glow, rgba(67, 214, 221, 0.18));
}

.afcra-live-page .metric-card { border-top-color: var(--metric-accent, var(--live-cyan)); }
.afcra-live-page .metric-card:nth-child(1) { --metric-accent: #43d6dd; --metric-glow: rgba(67,214,221,.18); }
.afcra-live-page .metric-card:nth-child(2) { --metric-accent: #f6c453; --metric-glow: rgba(246,196,83,.18); }
.afcra-live-page .metric-card:nth-child(3) { --metric-accent: #7dd3fc; --metric-glow: rgba(125,211,252,.18); }
.afcra-live-page .metric-card:nth-child(4) { --metric-accent: #4fd1b5; --metric-glow: rgba(79,209,181,.18); }
.afcra-live-page .metric-card:nth-child(5) { --metric-accent: #67e8f9; --metric-glow: rgba(103,232,249,.18); }
.afcra-live-page .metric-card:nth-child(6) { --metric-accent: #e8ad38; --metric-glow: rgba(232,173,56,.18); }
.afcra-live-page .metric-card:nth-child(7) { --metric-accent: #93c5fd; --metric-glow: rgba(147,197,253,.18); }
.afcra-live-page .metric-card:nth-child(8) { --metric-accent: #5eead4; --metric-glow: rgba(94,234,212,.18); }

/*
 * Alternate headline values between AfCRA cyan and gold.
 * The colours are presentational only and do not represent
 * positive or negative economic assessments.
 */
.afcra-live-page .metric-card:nth-child(even) .metric-value {
    color: var(--live-gold);

    text-shadow:
        0 0 18px rgba(232, 173, 56, 0.18);
}

.afcra-live-page .metric-period {
    color: #7894ab;
    font-size: 12px;
}


/* ==========================================================================
   SOVEREIGN TICKER
   ========================================================================== */

.afcra-live-ticker {
    overflow: hidden;

    margin-top: 12px;
    padding: 10px 0;

    border-top: 1px solid var(--live-border);
    border-bottom: 1px solid var(--live-border);

    color: #c6d5e1;
    white-space: nowrap;
}

.afcra-live-ticker-content {
    display: inline-block;
    animation: afcraTickerMovement 30s linear infinite;
}

@keyframes afcraTickerMovement {
    to {
        transform: translateX(-50%);
    }
}


/* ==========================================================================
   SOVEREIGN TREND CHARTS
   ========================================================================== */

.afcra-live-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.afcra-live-chart-panel {
    height: 360px;
    padding: 18px;

    border: 1px solid var(--live-border);
    border-radius: 14px;

    background:
        linear-gradient(
            160deg,
            rgba(8, 38, 64, 0.98),
            rgba(3, 24, 42, 0.98)
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}


/* ==========================================================================
   AFCRA RESEARCH WHEEL
   ========================================================================== */

.afcra-live-wheel {
    margin-top: 18px;
}

.afcra-live-wheel .wheel-shell {
    margin-top: 0;
}


/* ==========================================================================
   DATA SOURCE NOTE
   ========================================================================== */

.afcra-live-source-note {
    margin-top: 18px;

    color: #7894ab;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}


/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 1000px) {

    .afcra-live-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .afcra-live-charts {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 640px) {

    .afcra-live-page {
        padding-top: 20px;
    }

    .afcra-live-wrapper {
        width: 100%;
        padding: 0 16px;
    }

    .afcra-live-topbar,
    .afcra-live-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .afcra-live-hero {
        margin-top: 26px;
    }

    .afcra-live-metrics {
        grid-template-columns: 1fr;
    }

    .afcra-live-chart-panel {
        height: 320px;
        padding: 12px;
    }

    .afcra-live-status {
        font-size: 11px;
    }
}


/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .afcra-live-dot,
    .afcra-live-ticker-content {
        animation: none;
    }
}
/* AfCRA Live — final Research Wheel positioning */
.afcra-live-page .afcra-live-wheel .wheel-stage {
    height: 700px !important;
    min-height: 700px !important;
    overflow: visible !important;
}
.afcra-live-page .afcra-live-wheel .wheel-stage > svg {
    transform: translateY(-88px) !important;
}
.afcra-live-page .afcra-live-wheel .flow-caption {
    margin: 54px auto 0 !important;
}
@media (max-width: 1180px) {
    .afcra-live-page .afcra-live-wheel .wheel-stage { height: 610px !important; min-height: 610px !important; }
    .afcra-live-page .afcra-live-wheel .wheel-stage > svg { transform: translateY(-58px) !important; }
    .afcra-live-page .afcra-live-wheel .flow-caption { margin-top: 42px !important; }
}
@media (max-width: 900px) {
    .afcra-live-page .afcra-live-wheel .wheel-stage { height: 540px !important; min-height: 540px !important; }
    .afcra-live-page .afcra-live-wheel .wheel-stage > svg { transform: translateY(-38px) !important; }
    .afcra-live-page .afcra-live-wheel .flow-caption { margin-top: 30px !important; }
}
@media (max-width: 680px) {
    .afcra-live-page .afcra-live-wheel .wheel-stage { height: 420px !important; min-height: 420px !important; }
    .afcra-live-page .afcra-live-wheel .wheel-stage > svg { transform: translateY(-20px) !important; }
    .afcra-live-page .afcra-live-wheel .flow-caption { margin-top: 24px !important; }
}


/* ==========================================================================
   AfCRA Live — presentation typography refinement
   Supporting text is enlarged for executive/presentation readability.
   Metric headline values retain their existing size.
   ========================================================================== */

.afcra-live-status {
    font-size: 15px;
}

.afcra-live-meta,
.afcra-live-clock {
    font-size: 16px;
    line-height: 1.5;
}

.afcra-live-section-label {
    font-size: 15px;
    font-weight: 700;
}

.afcra-live-page .metric-card {
    padding: 20px;
}

.afcra-live-page .metric-label {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.065em;
}

/* Keep the large numerical values unchanged at 36px. */
.afcra-live-page .metric-period {
    color: #a9bfd1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
}

.afcra-live-ticker {
    font-size: 15px;
    line-height: 1.5;
}

.afcra-live-source-note {
    color: #9db4c8;
    font-size: 14px;
    line-height: 1.65;
}

.afcra-live-wheel .wheel-titlebar span {
    font-size: 14px;
}

.afcra-live-wheel .side-title {
    font-size: 14px;
}

.afcra-live-wheel .io-card h4 {
    font-size: 14px;
}

.afcra-live-wheel .io-card p {
    font-size: 13px;
    line-height: 1.55;
}

.afcra-live-wheel .flow-caption span {
    font-size: 13px !important;
}

@media (max-width: 640px) {
    .afcra-live-status {
        font-size: 13px;
    }

    .afcra-live-meta,
    .afcra-live-clock {
        font-size: 15px;
    }

    .afcra-live-section-label {
        font-size: 14px;
    }

    .afcra-live-page .metric-label {
        font-size: 14px;
    }

    .afcra-live-page .metric-period {
        font-size: 13px;
    }

    .afcra-live-source-note {
        font-size: 13px;
    }
}
