/* ── Legend / Console Panel ───────────────────────────────────────────────
   Shared legend styles extracted from page3_remote_sensing.
   All visual properties match that map's console panel exactly.
──────────────────────────────────────────────────────────────────────── */

/* Main panel container */
#console {
    position: absolute;
    bottom: 1.2rem;
    left: 1.2rem;
    width: fit-content;
    background: rgba(7, 9, 15, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: bottom 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.chart-visible #console {
    bottom: calc(220px + 1.2rem + 0.8rem);
}

/* Inner column layout */
#controls-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.7rem;
    width: 270px;
    flex-shrink: 0;
}

/* ── Typography ─────────────────────────────────────────────────────── */

.label-tiny {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.1rem;
}

#active-year {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    color: #3b82f6;
}

.country-name {
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    color: #fff;
    display: block;
    line-height: 1.2;
}

.pm-val {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    color: #fff;
}

.cta-text {
    font-size: 0.8rem;
    font-family: 'Manrope', sans-serif;
    color: #94a3b8;
    line-height: 1.3;
    margin-top: 0.2rem;
}

/* ── Info button + tooltip ─────────────────────────────────────────── */

#info-wrap {
    position: relative;
    display: flex;
    justify-content: flex-end;
}

#info-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #64748b;
    font-size: 0.65rem;
    font-family: 'Manrope', sans-serif;
    padding: 0.25rem 0.5rem;
    cursor: default;
    letter-spacing: 0.05em;
    transition: color 0.2s, border-color 0.2s;
}

#info-btn:hover {
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.3);
}

#info-tooltip {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 0;
    width: 256px;
    background: rgba(7, 9, 15, 0.97);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1rem;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.6;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#info-tooltip strong {
    color: #e2e8f0;
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.78rem;
}

#info-wrap:hover #info-tooltip {
    opacity: 1;
}

/* ── Scale / colour bar ─────────────────────────────────────────────── */

.legend-bar {
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, #009966, #f1d300, #f18b00, #ff0000, #7e0023);
    border-radius: 1px;
    margin: 0.3rem 0;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.55rem;
    color: #64748b;
    font-family: 'Manrope', sans-serif;
}

/* ── Buttons ────────────────────────────────────────────────────────── */

.button {
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    cursor: pointer;
    font-family: 'Manrope', sans-serif;
    font-size: 0.65rem;
    transition: 0.2s;
}

.button:hover {
    background: #334155;
    color: #fff;
}

.button.playing {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

/* ── Utility ────────────────────────────────────────────────────────── */

.flex-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
