/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
    --bg-app:     #1c1c20;
    --bg-panel:   #26262b;
    --border:     #3d3d45;
    --text-main:  #fafafa;
    --text-muted: #a1a1aa;
    --accent:     #ff2020;
    --accent-glow:rgba(255, 32, 32, 0.45);
    --font:       'Inter', system-ui, -apple-system, sans-serif;
    --font-clock: 'Orbitron', 'Courier New', monospace;
    --bar-h:      66px;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg-app);
    color: var(--text-main);
    font-family: var(--font);
}

body { display: flex; flex-direction: column; }

/* ── Clock panel ────────────────────────────────────────────────────────────── */
#clock-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#clock-canvas { display: block; }

/* ── Info bar ───────────────────────────────────────────────────────────────── */
#info-bar {
    height: var(--bar-h);
    flex-shrink: 0;
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 0;
    overflow: hidden;
}

/* Vertical separator */
.bar-sep {
    width: 1px;
    height: 30px;
    background: var(--border);
    margin: 0 22px;
    flex-shrink: 0;
}

/* Thin in-line separator inside weather row */
.bar-vsep {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 10px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ── Info group (date / city) ───────────────────────────────────────────────── */
.info-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
    white-space: nowrap;
}

.info-group--right {
    text-align: right;
}

#bar-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    text-transform: capitalize;
}

.bar-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ── Weather group ──────────────────────────────────────────────────────────── */
#weather-group {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}

#weather-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
}

#weather-content {
    display: none;           /* shown by JS once data arrives */
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    overflow: hidden;
}

#bar-w-icon {
    font-size: 1.9rem;
    line-height: 1;
    flex-shrink: 0;
}

#bar-w-temp {
    font-family: var(--font-clock);
    font-size: 1.55rem;
    font-weight: 900;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.5s ease;
}

#bar-w-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-chip {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Spinner ────────────────────────────────────────────────────────────────── */
.spinner {
    width: 12px;
    height: 12px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track  { background: var(--bg-app); }
::-webkit-scrollbar-thumb  { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
