.time-slider-container {
    position: absolute;
    bottom: 276px; /* 24px gap + 220px panel + 24px margin - reduced for compact bar */
    left: calc(var(--left-sidebar-total) + (100vw - var(--left-sidebar-total) - var(--right-sidebar-total)) / 2);
    transform: translateX(-50%);
    width: calc(100vw - var(--left-sidebar-total) - var(--right-sidebar-total) - 96px);
    max-width: 860px;
    z-index: 1000;
    border-radius: 40px;         /* pill shape */
    padding: 0 18px;
    height: 44px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    animation: slideUp 0.6s ease-out forwards;
    transition: left 0.3s ease, width 0.3s ease, bottom 0.3s ease;
}

body.collapse-bottom .time-slider-container {
    bottom: 24px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.slider-inline-wrapper {
    flex: 1;           /* grows to fill the row */
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.time-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.glass-select {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.75rem;
    outline: none;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.glass-select:hover {
    background: rgba(255, 255, 255, 0.2);
}

.glass-select option {
    background: #1e1e24;
    color: var(--text-main);
}

#current-time-display {
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.3px;
    color: var(--accent-hover);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 120px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: var(--accent);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* HTML5 Range Input Custom Styling */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: var(--text-main);
    border: 2px solid var(--accent);
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
    transition: transform 0.15s ease, background 0.15s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--accent);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 2px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1px;
}

.slider-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1;
}

/* =========================================
   BOTTOM HORIZONTAL DATA PANEL (METEOGRAM)
   ========================================= */
.bottom-data-panel {
    position: absolute;
    bottom: 24px;
    left: var(--left-sidebar-total);
    width: calc(100vw - var(--left-sidebar-total) - var(--right-sidebar-total));
    height: 220px;
    z-index: 1000;
    padding: 12px 32px;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    transition: left 0.3s ease, width 0.3s ease, transform 0.3s ease;
}

body.collapse-bottom .bottom-data-panel {
    transform: translateY(calc(100% + 24px));
}

.meteogram-tabs {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 12px;
}

.meteogram-tabs .radio-item {
    font-size: 1rem;
    color: #cbd5e1;
}

.meteogram-tabs .radio-item:hover,
.meteogram-tabs input:checked ~ .radio-label {
    color: #ffffff;
}

.meteogram-tabs .radio-custom {
    border-color: #f97316; /* Orange border */
}

.meteogram-tabs input:checked + .radio-custom {
    background: transparent;
    border-color: #ea580c;
}

.meteogram-tabs input:checked + .radio-custom::after {
    background: #f97316; /* Orange fill */
}

.meteogram-table-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    overflow-x: auto;
    overflow-y: auto;
    flex-grow: 1;
    display: block;          /* let the <table> size itself */
    padding: 4px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Custom Scrollbar for meteogram table */
.meteogram-table-container::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}
.meteogram-table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
.meteogram-table-container::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 4px;
}
.meteogram-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.8);
}

.meteogram-row {
    display: flex;
    align-items: center;
    min-height: 34px;
    color: #cbd5e1;
}

.meteogram-row.header-row {
    color: #f1f5f9;
    font-weight: 500;
    margin-bottom: 8px;
}

.meteogram-row .row-label {
    width: 180px;
    position: sticky;
    left: 0;
    background: rgba(15, 17, 26, 0.95);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #94a3b8;
    z-index: 10;
}

.meteogram-row.header-row .row-label {
    background: transparent;
}

.meteogram-row .hour-col {
    width: 60px;
    min-width: 60px;
    text-align: center;
    font-size: 0.95rem;
}

.meteogram-row .hour-icon-col {
    width: 60px;
    min-width: 60px;
    text-align: center;
    font-size: 1.2rem;
}

.meteogram-row:not(.header-row) {
    margin-bottom: 8px;
}

/* ── Location label strip ───────────────────────────────── */
.meteogram-location-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px 3px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 4px;
    flex-shrink: 0;
}

.meteogram-location-icon {
    font-size: 0.9rem;
    opacity: 0.75;
}

.meteogram-location-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: #93c5fd;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meteogram-range-options {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 6px;
}

.meteogram-range-item {
    align-items: center;
    font-size: 0.72rem;
    color: #9ca3af;
    line-height: 1;
}

.meteogram-range-item .radio-custom {
    width: 12px;
    height: 12px;
    margin-right: 6px;
    margin-top: 0;
    border-width: 1.5px;
}

.meteogram-range-item input:checked ~ .radio-label,
.meteogram-range-item:hover .radio-label {
    color: #dbeafe;
}

.meteogram-range-item input:checked + .radio-custom::after {
    top: 2px;
    left: 2px;
    width: 5px;
    height: 5px;
    background: #60a5fa;
}

.meteogram-location-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(96,165,250,0.3);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: metro-spin 0.8s linear infinite;
    flex-shrink: 0;
}

/* ── Inline loading spinner inside the table container ──── */
.metro-loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(96,165,250,0.3);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: metro-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

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

/* ── Placeholder message ────────────────────────────────── */
.meteogram-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 120px;
    color: rgba(148,163,184,0.6);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    text-align: center;
    gap: 8px;
}

/* ── Real HTML table inside .meteogram-table-container ────────────────── */
.mg-table {
    min-width: 100%;
    width: max-content;
    border-collapse: collapse;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    table-layout: fixed;         /* column widths come from the first row / colgroup */
}

/* Sticky label column – always visible even when scrolled right */
.mg-label-th,
.mg-label {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 170px;
    min-width: 170px;
    max-width: 170px;
    white-space: nowrap;
    padding: 6px 14px 6px 16px;
    text-align: left;
    color: #94a3b8;
    font-size: 0.82rem;
}

.mg-label-th {
    /* Same solid background as thead row so the empty cell never looks like
       it contains a time value (fixes the 'time shown at header' artefact) */
    background: rgba(30,30,40,0.7);
    backdrop-filter: blur(12px);
}

.mg-label {
    background: rgba(15,17,26,0.95);
    backdrop-filter: blur(12px);
}

.mg-icon {
    font-size: 1.1rem;
    margin-right: 6px;
    vertical-align: middle;
}

/* Header row */
.mg-table thead tr {
    background: rgba(30,30,40,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mg-th {
    width: 58px;
    min-width: 58px;
    padding: 3px 4px;
    text-align: center;
    color: #93c5fd;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Data rows */
.mg-table tbody tr:nth-child(odd) {
    background: rgba(255,255,255,0.02);
}
.mg-table tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.05);
}
.mg-table tbody tr:hover {
    background: rgba(96,165,250,0.1);
}

.mg-td {
    width: 58px;
    min-width: 58px;
    padding: 4px 4px;
    text-align: center;
    color: #e2e8f0;
    white-space: nowrap;
    border-left: 1px solid rgba(255,255,255,0.04);
}
