/* ═══════════════════════════════════════════
   Bee Smart MeteoDock — Map CSS
   ═══════════════════════════════════════════ */

:root {
    --glass-bg: rgba(15, 23, 42, 0.82);
    --glass-border: rgba(255, 255, 255, 0.10);
    --accent-green: #00ff88;
    --accent-yellow: #fcd303;
    --accent-blue: #4299e1;
    /* Tamni tekst u skladu s header paletom (slate / glass) */
    --header-text-dark: #0f172a;
    --header-text-muted: #1e293b;
}

html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #0b0e11;
    height: 100%;
    min-height: 100%;
    min-height: 100dvh;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    color: #fff;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}

/* ══ Full-screen map ══ */
#map {
    position: absolute; inset: 0; z-index: 1;
    /*
     * Dno velocity trapeza = vrh #timeline-bar: isti bottom kao traka + njena ukupna visina
     * (box + obrub 3px + padding + redovi). Manja vrijednost = niže = dodiruje traku.
     */
    --velocity-stack: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 88px);
    /* Tamno plava pozadina = boja mirnog mora (0 čv iz skale)
       Pokriva rubna područja izvan wind-grid pokrivenosti        */
    background: #08123a;
}

/* OpenTopoMap — blago prigušen da wind layer bude čitljiviji */
.leaflet-tile-container {
    filter: brightness(88%) saturate(0.85) !important;
}

/* ══ Header date / time typography ══ */
.hdr-time {
    font-size: 20px;
    font-weight: 900;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    line-height: 1;
}

.hdr-date {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.62);
    font-variant: small-caps;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: lowercase; /* small-caps zahtijeva lowercase izvor */
}

/* ══ Language Switcher ══ */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    cursor: pointer;
}

.lang-btn .fi {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    flex-shrink: 0;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: #e2e8f0;
}

.lang-btn.lang-active {
    background: rgba(66, 153, 225, 0.18);
    border-color: rgba(66, 153, 225, 0.40);
    color: #93c5fd;
}

/* ══ Glass Header ══ */
#glass-header {
    position: absolute;
    top: max(12px, env(safe-area-inset-top, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    min-height: 56px;
    background: var(--glass-bg);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 10px 18px;
    justify-content: space-between;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    z-index: 2000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}

.glass-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.glass-header__logo {
    height: 48px;
    width: auto;
    max-width: min(200px, 42vw);
    object-fit: contain;
    flex-shrink: 0;
}

.glass-header__meta {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex: 0 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

.glass-header__datetime {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    min-width: 0;
}

.status-pill {
    background: rgba(0, 255, 136, 0.10);
    color: var(--accent-green);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(0, 255, 136, 0.22);
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-pill__label {
    display: inline;
}

.dot {
    height: 8px; width: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    box-shadow: 0 0 8px var(--accent-green);
    animation: blink 2s infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ══ Side panel ══ */
#side-panel {
    position: absolute;
    top: 102px;
    left: max(12px, env(safe-area-inset-left, 0px));
    width: min(260px, calc(100vw - 24px));
    max-width: 100%;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
}

.station-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: #e2e8f0;
}
.station-card:hover { background: rgba(30, 41, 59, 0.94); }
.station-card.active { border-left: 4px solid var(--accent-green); }

/* ══ Popup ══ */
.leaflet-popup-content-wrapper {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(16px) !important;
    color: #fff !important;
    border-radius: 14px !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
    min-width: 280px !important;
}
.leaflet-popup-tip { background: var(--glass-bg) !important; }
.leaflet-popup-close-button { color: #94a3b8 !important; }
.leaflet-popup-close-button:hover { color: #fff !important; }

/*
 * Popup stanice: panel desno od pčelice, strelica lijevo prema sredini desnog ruba kruga.
 * Leaflet kod zoom-animacije postavlja i transform I left/bottom — bottom/left moraju biti auto
 * da ostane samo translate3d (inače se panel „zalijepi” iznad markera kao na staroj slici).
 
.meteo-bee-popup.leaflet-popup {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    text-align: left !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    margin-bottom: 0 !important;
    transform: translate(calc(50vw + 20px), calc(50vh - 120px)) !important;
}
*/
.meteo-bee-popup.leaflet-popup {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important; /* Ovo pomaže da se dno poravna */
    pointer-events: none;
    /* MAKNI: bottom: auto, left: auto i transform odavde! */
}


.meteo-bee-popup .leaflet-popup-close-button {
    position: absolute !important;
    top: 10px !important;
    right: 8px !important;
    z-index: 3;
    color: rgba(255, 255, 255, 0.65) !important;
    font-size: 18px !important;
    width: 28px !important;
    height: 28px !important;
    line-height: 26px !important;
}

.meteo-bee-popup .leaflet-popup-close-button:hover {
    color: #fff !important;
}

/* Staklena školjka — cijeli omot (točne vrijednosti iz uputa) */
.meteo-bee-popup .leaflet-popup-content-wrapper {
    order: 2;
    pointer-events: auto;
    margin: 0 !important;
    margin-left: 14px !important;
    position: relative;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 3px solid #1e2737 !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 1px 24px rgba(255, 255, 255, 0.12) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    min-width: 296px !important;
}

.meteo-bee-popup .leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
    width: auto !important;
}

/*
 * Kljun sidren od dna popupa (nakon vertikalnog pomaka panela ostaje usmjeren prema pčelici).
 */
.meteo-bee-popup .leaflet-popup-tip-container {
    order: 1;
    position: absolute !important;
    left: 0 !important;
    bottom: 30px !important;
    top: auto !important;
    margin: 0 !important;
    width: 13px !important;
    min-height: 0 !important;
    height: 22px !important;
    align-self: auto !important;
    flex-shrink: 0;
    pointer-events: none;
    overflow: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

/*
 * Pravi trokut (ne rotirani kvadrat Leafleta): baza uz panel, vrh ulijevo prema markeru.
 */
/* Kljun: isti „stakleni” ton kao panel (bijela / prozirna baza) */
.meteo-bee-popup .leaflet-popup-tip {
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    top: auto !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    -webkit-transform: none !important;
    transform: none !important;
    border-top: 9px solid transparent !important;
    border-bottom: 9px solid transparent !important;
    border-right: 11px solid #1e2737 !important;
}

/* Unutarnji sadržaj — Roboto Condensed, svijetli tekst na karti */
.bee-popup {
    display: flex;
    flex-direction: column;
    min-width: 272px;
    padding: 0 14px 14px;
    padding-top: 0;
    font-family: 'Roboto Condensed', 'Inter', system-ui, sans-serif;
    color: rgba(255, 255, 255, 0.92);
}

/*
 * Head + tint: rub-do-ruba s gornjim rubom panela (nema praznine iznad tamne trake).
 */
.bee-popup__head {
    box-sizing: border-box;
    width: calc(100% + 28px);
    max-width: none;
    margin: 0 -14px 12px -14px;
    padding: 0;
    background: transparent !important;
    display: block !important;
}

.bee-popup__head-tint {
    box-sizing: border-box;
    width: 100%;
    background: rgba(30, 39, 55, 0.2);
    padding: 10px 48px 8px;
}

/*
.bee-popup__title {
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    text-align: center;
    display: block;
    padding: 0;
    font-family: 'Roboto Condensed', 'Inter', system-ui, sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: 0.01em;
    color: #1e2737;
    text-transform: none;
}
*/
.bee-popup__title {
    margin: 0 !important;
    width: 100% !important;
    
    /* SMANJUJEMO PADDING: Ovo diže naslov gore i širi ga do rubova */
    padding-top: 8px !important; 
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 5px !important; /* Dovoljno mjesta do crte ispod */
    
    /* CENTRIRANJE: Ovo ga postavlja u sredinu stakla */
    text-align: center !important; 
    display: block !important;
    
    /* Tvoji stilovi fonta */
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.22;
    letter-spacing: 0.001em;
    color: #1e2737;
    text-transform: none;
    
    box-sizing: border-box; /* Osigurava da padding ne širi okvir */
}

.bee-popup__title {
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    text-align: center;
    display: block;
    padding: 0;
    font-family: 'Roboto Condensed', 'Inter', system-ui, sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: 0.01em;
    color: #1e2737;
    text-transform: none;
}
.bee-popup__rule {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    margin: 0 0 10px;
}

.bee-popup__sec {
    margin-bottom: 10px;
}

/*
.bee-popup__sec-title {
    margin: 0 0 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
*/
.bee-popup__sec-title {
    margin: 0 0 8px;
    font-family: 'Roboto Condensed', sans-serif !important; /* Dodano */
    font-size: 20px !important;       /* Povećano (bilo je 10px) */
    font-weight: 600 !important;      /* Podebljano */
    letter-spacing: 0.01em;
    text-transform: none !important;  /* NIJE više sve velikim slovima */
    color: #1e2737 !important;        /* Tvoja tamna boja iz headera */
    margin-bottom: 2px !important;
    padding-bottom: 0 !important;
    line-height: 1.2 !important;
}

.bee-popup__row2 {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
}

.bee-popup__cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.bee-popup__cell--right {
    align-items: flex-end;
    text-align: right;
}

/*
.bee-popup__lbl {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}
*/
.bee-popup__lbl {
    font-family: 'Roboto Condensed', sans-serif !important;
    font-size: 13px !important;       /* Povećali smo mrvicu */
    font-weight: 600 !important;
    text-transform: none !important;  /* OVO MIČE VELIKA SLOVA */
    color: #1e2737 !important;
    opacity: 0.7;                     /* Malo prozirnije za eleganciju */
}
.bee-popup__val {
    font-size: 17px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.15;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.bee-popup__barograf {
    min-height: 76px;
    margin-top: 2px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 0px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.bee-popup__svg {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.bee-popup__status-wrap {
    font-size: 13px;
    font-weight: 600;
}

.bee-popup__status--ok {
    color: rgba(200, 255, 220, 0.95);
    text-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}

.bee-popup__status--off {
    color: rgba(255, 220, 180, 0.9);
}

/* Gumb — tamni rub i tamni tekst (usklađeno s naslovom panela) */
.bee-popup__dash {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    padding: 14px 16px;
    min-height: 48px;
    box-sizing: border-box;
    text-align: center;
    font-family: 'Roboto Condensed', 'Inter', system-ui, sans-serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    line-height: 1.35;
    color: #1e2737 !important;
    text-decoration: none !important;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 2px solid #1e2737 !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bee-popup__dash:hover {
    background: rgba(30, 39, 55, 0.12) !important;
    border-color: #0f172a !important;
    color: #0f172a !important;
}

.sensor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.sensor-item { font-size: 12px; display: flex; align-items: center; gap: 5px; color: #94a3b8; }
.sensor-item b { color: #fff; font-size: 13px; }

/* ══ BS Marker ══ */
.bee-marker-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    width: 44px;
    box-sizing: border-box;
}

.bs-marker-img {
    width: 44px;
    height: 47px;
    flex-shrink: 0;
    object-fit: contain;
    filter:
        drop-shadow(0 3px 8px rgba(0, 0, 0, 0.65))
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.40));
    transition: transform 0.18s, filter 0.18s;
    display: block;
}

/* Leaflet: fiksna veličina slike; iconSize obuhvaća i tekst ispod */
.leaflet-marker-icon .bs-marker-img,
.leaflet-marker-icon svg {
    width: 44px !important;
    height: 47px !important;
    max-height: 47px !important;
}
.bee-marker-wrap:hover .bs-marker-img {
    transform: scale(1.12);
    filter:
        drop-shadow(0 5px 14px rgba(0, 0, 0, 0.80))
        drop-shadow(0 0 16px rgba(255, 255, 255, 0.60));
}

.bee-label {
    margin-top: 4px;
    font-size: 11px; font-weight: 700;
    color: #fff;
    text-shadow: 0 0 6px rgba(0,0,0,0.9), 1px 1px 0 #000;
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 0.03em;
}

/* ══ Wind Color Layer — legend (20% veća od originala) ══ */
.wind-legend {
    background: rgba(30, 39, 46, 0.10);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 3px solid rgba(15, 23, 42, 0.95);
    border-radius: 16px;
    padding: 12px 14px;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 104px;
    user-select: none;
}
.wind-legend .wl-title {
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.60);
}
.wind-legend .wl-body {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 9px;
}
.wind-legend .wl-gradient-bar {
    width: 18px;
    height: 140px;
    border-radius: 5px;
    flex-shrink: 0;
    opacity: 0.95;
}
.wind-legend .wl-ticks {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 140px;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.70);
}
.wind-legend .wl-foot {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.50);
    text-align: center;
    letter-spacing: 0.05em;
}

/* ══ Velocity (vjetar pod pokazivačem) — centrirano iznad trake, trapez ══ */
.leaflet-bottom.leaflet-left {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    bottom: var(--velocity-stack) !important;
    margin: 0 !important;
    z-index: 1999;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.leaflet-bottom.leaflet-left .leaflet-control {
    margin-left: 0 !important;
    margin-bottom: 0 !important;
}

.leaflet-control-velocity {
    box-sizing: border-box !important;
    width: min(92vw, 840px) !important;
    max-width: calc(100vw - 24px) !important;
    margin: 0 !important;
    /* ~30% niži trapez: 0.7 × vertikalnog paddinga + kompaktniji tipometar */
    /* +2px gornji padding — tekst vizualno 2px niže u trapezu */
    padding: 10px 12% 9px !important;
    font-family: 'Roboto Condensed', 'Inter', system-ui, sans-serif !important;
    font-size: calc(12px * 1.4) !important; /* +40% od 12px ≈ 16.8px */
    line-height: 1.34 !important;
    font-weight: 600 !important;
    color: var(--header-text-muted) !important;
    text-align: center !important;
    border: none !important;
    border-radius: 0 !important;
    letter-spacing: 0.02em;
    /* Donji rub širi od gornjeg — „naslanja“ vizualno na traku ispod */
    clip-path: polygon(18% 0%, 82% 0%, 100% 100%, 0% 100%);
    background: rgba(30, 39, 46, 0.10) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    /* drop-shadow prati clip-path (za razliku od box-shadow) */
    filter: drop-shadow(0 -2px 14px rgba(0, 0, 0, 0.45));
    pointer-events: none;
}

.leaflet-control-velocity strong {
    color: var(--header-text-dark) !important;
    font-weight: 700 !important;
    font-family: 'Roboto Condensed', 'Inter', system-ui, sans-serif !important;
}

/* ══ Timeline Slider — ista staklena pozadina kao .wind-legend (ČV) ══ */
#timeline-bar {
    position: absolute;
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: min(92%, 840px);
    max-width: calc(100vw - 24px);
    z-index: 2000;
    box-sizing: border-box;
    background: rgba(30, 39, 46, 0.10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 3px solid rgba(15, 23, 42, 0.95);
    border-radius: 16px;
    padding: 11px 22px 13px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    user-select: none;
    box-shadow: none;
    color: #ffffff;
}

#tl-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#tl-time {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #fcd303;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.60);
}

.tl-badge {
    font-size: 10px;
    font-weight: 800;
    background: rgba(0, 255, 136, 0.14);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.30);
    border-radius: 999px;
    padding: 2px 9px;
    letter-spacing: 0.06em;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.tl-badge.future {
    background: rgba(66, 153, 225, 0.14);
    color: #60a5fa;
    border-color: rgba(66, 153, 225, 0.30);
}

#tl-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.22);
    outline: none;
    cursor: pointer;
}

#tl-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4299e1;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(66, 153, 225, 0.65);
    transition: background 0.15s, box-shadow 0.15s;
}

#tl-slider::-webkit-slider-thumb:hover {
    background: #63b3ed;
    box-shadow: 0 0 14px rgba(66, 153, 225, 0.90);
}

#tl-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: #4299e1;
    cursor: pointer;
}

#tl-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.70);
}

/* ══ Početna stranica — copyright (donji lijevi kut) ══ */
.meteo-site-footer {
    position: absolute;
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
    z-index: 2000;
    max-width: calc(100vw - 24px);
    font-family: 'Roboto Condensed', 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(226, 232, 240, 0.72);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
    pointer-events: auto;
    line-height: 1.35;
}

.meteo-site-footer a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 600;
}

.meteo-site-footer a:hover {
    color: #bfdbfe;
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════
   Responsive — tablet, mobile, notch / safe-area
   ═══════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
    /*
     * Zajednički gornji pomak za zoom (+/−) i legendu vjetra — vrh legende
     * poravnat s vrhom zoom trake (ista margina kao .leaflet-top .leaflet-control).
     */
    #map {
        --meteo-zoom-stack-top: calc(96px + env(safe-area-inset-top, 0px));
    }

    #side-panel {
        width: min(240px, calc(100vw - 24px));
        top: 96px;
    }

    .hdr-time { font-size: 18px; }
    .hdr-date { font-size: 12px; max-width: 42vw; text-align: right; }

    .leaflet-top.leaflet-right {
        top: var(--meteo-zoom-stack-top) !important;
    }

    /*
     * Legenda u gornjem desnom kutu, isti okomiti početak kao zoom — prekriva +/−
     * (zumiranje ostaje pinch); ne siječe se s vremenskom trakom.
     */
    .leaflet-bottom.leaflet-right {
        bottom: auto !important;
        top: var(--meteo-zoom-stack-top) !important;
        margin-bottom: 0 !important;
        z-index: 1200 !important;
    }

    .leaflet-bottom.leaflet-right .leaflet-control {
        margin-top: 10px !important;
        margin-bottom: 0 !important;
    }
}

/* Mobile landscape / narrow tablet */
@media (max-width: 767px) {
    #map {
        --meteo-zoom-stack-top: calc(124px + env(safe-area-inset-top, 0px));
        --velocity-stack: calc(max(8px, env(safe-area-inset-bottom, 0px)) + 100px);
    }

    /* Jedan red: lijevo logo+status, desno stupac — zastave gore, sat/datum ispod */
    #glass-header {
        padding: 8px 12px;
        gap: 8px 10px;
        flex-wrap: nowrap;
        align-items: flex-start;
    }

    .glass-header__brand {
        flex: 1 1 auto;
        min-width: 0;
        align-self: flex-start;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    /* Red: zastave | sat+datum — dno pločica poravnato s dnom retka datuma */
    .glass-header__meta {
        flex: 0 0 auto;
        flex-direction: row;
        align-items: flex-end;
        justify-content: flex-end;
        gap: 10px;
        align-self: flex-start;
    }

    .glass-header__datetime {
        align-items: flex-end;
        text-align: right;
        width: auto;
        flex: 0 1 auto;
        min-width: 0;
    }

    .glass-header__logo {
        height: 40px;
        max-width: min(180px, calc(100vw - 140px));
    }

    .hdr-time { font-size: 17px; }
    .hdr-date {
        font-size: 11px;
        max-width: min(200px, 52vw);
        line-height: 1.15;
        text-align: right;
    }

    /* Stanice: horizontalni strip iznad vremenske trake — vidljivo na mobitelu */
    #side-panel {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        top: auto;
        bottom: calc(128px + env(safe-area-inset-bottom, 0px));
        left: max(10px, env(safe-area-inset-left, 0px));
        right: max(10px, env(safe-area-inset-right, 0px));
        width: auto;
        max-width: none;
        padding: 4px 2px 8px;
        gap: 8px;
    }

    #side-panel::-webkit-scrollbar {
        height: 4px;
    }

    .station-card {
        flex: 0 0 auto;
        min-width: min(260px, calc(100vw - 40px));
        max-width: 280px;
    }

    #timeline-bar {
        width: min(94%, 840px);
        padding: 10px 14px 12px;
        bottom: max(8px, env(safe-area-inset-bottom, 0px));
    }

    /* Legenda kompaktnija */
    .wind-legend {
        padding: 8px 10px;
        font-size: 11px;
        min-width: 88px;
    }

    .wind-legend .wl-gradient-bar {
        height: 100px;
    }

    .wind-legend .wl-ticks {
        height: 100px;
        font-size: 10px;
    }

    .wind-legend .wl-title {
        font-size: 9px;
    }
}

/* Mali mobitel */
@media (max-width: 400px) {
    #map {
        --velocity-stack: calc(max(8px, env(safe-area-inset-bottom, 0px)) + 94px);
    }

    .glass-header__logo {
        height: 34px;
    }

    .lang-label {
        display: none;
    }

    .lang-btn {
        padding: 6px 8px;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
    }

    .status-pill {
        padding: 5px 10px;
    }

    #timeline-bar {
        padding: 8px 10px 10px;
    }

    #tl-time {
        font-size: 11px;
    }

    .tl-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
}

/* Landscape phone */
@media (max-width: 767px) and (orientation: landscape) {
    #map {
        --meteo-zoom-stack-top: calc(100px + env(safe-area-inset-top, 0px));
    }

    #side-panel {
        bottom: calc(108px + env(safe-area-inset-bottom, 0px));
        max-height: 120px;
        flex-wrap: wrap;
        align-content: flex-start;
    }
}

/* ═══════════════════════════════════════════
   NOVE KLASE ZA IKONE I TAMNU BOJU
   ═══════════════════════════════════════════ */

/* Prisiljavamo tamnu boju za sve elemente u body-ju panela */
.bee-popup__icon, 
.bee-popup__lbl, 
.bee-popup__val, 
.bee-popup__sec-title {
    color: #1e2737 !important;
    margin-bottom: 1px !important; /* Bilo je 8px ili više, sad je zbijeno */
    padding-top: 1px !important;
}

/* Specifično za ikone (Material Symbols) */
.bee-popup__icon {
    font-size: 20px !important;
    opacity: 1 !important;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    vertical-align: middle;
}

/* Kontejner koji drži ikonu i labelu u istom redu */
.bee-popup__item-header {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 2px !important;
}

/* Poravnanje brojeva ispod teksta (da ne bježe pod ikonu) */
.bee-popup__val {
    padding-left: 26px !important; /* Širina ikone + gap */
    display: block !important;
    font-size: 20px !important;
    font-weight: 700 !important;
}

/* Fix za desnu stranu (Vlaga) - tamo ne želimo padding-left */
.bee-popup__cell--right .bee-popup__val {
    padding-left: 0 !important;
    text-align: right !important;
}

/* Glavni kontejner za temperaturu */
.bee-popup__main-display {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 5px 0 !important;
}

/* Velika ikona termometra */
.bee-popup__big-icon {
    font-size: 52px !important; /* Povećano za moćniji izgled */
    color: #1e2737 !important;
    font-variation-settings: 'FILL' 0, 'wght' 200, 'GRAD' 0, 'opsz' 48;
    width: 50px;
    text-align: center;
}

/* Stupac za tekst */
.bee-popup__text-column {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

/* Labela "Temperatura" */
.bee-popup__lbl {
    font-family: 'Roboto Condensed', sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #1e2737 !important;
    text-transform: none !important;
    margin: 0 !important;
    line-height: 1 !important;
    opacity: 0.7;
}


/* 1. Mreža za Osnovno - dijeli na dva jednaka stupca */
.bee-popup__osnovno-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* Dva jednaka stupca */
    gap: 10px !important;
    /*width: 100% !important;
    padding: 10px 0 !important;*/
    padding-top: 0 !important; /* Dižemo sve prema gore */
    margin-top: -12px !important; /* Dodatno primicanje naslovu */
    align-items: flex-start !important;
    
}

/* 2. Zajednički stil za Temp i Vlagu */
.bee-popup__main-display {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important; /* Smanjen razmak između ikone i teksta */
}

/* 3. Ikone - velike i tanke */
.bee-popup__big-icon {
    font-size: 50px !important; /* Povećano (bilo je 32-38px) */
    width: 42px !important; /* FIKSNA ŠIRINA: Ovo sprječava razbucavanje stupca */
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-right: 2px !important;
    margin-top: 15px !important;
    color: #1e2737 !important;
    font-variation-settings: 'wght' 200 !important; /* Tanka linija izgleda bolje kad je velika */
}

/* Smjer vjetra — Material "navigation", rotacija = smjer iz kojeg puše (meteo °) */
.bee-popup__wind-dir-icon {
    transform-origin: center center;
    transition: transform 0.25s ease;
}

/* Ikona + oznaka N / NNE / … jedan stupac */
.bee-popup__wind-icon-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-shrink: 0;
    margin-right: 2px !important;
    margin-top: 15px !important;
}

.bee-popup__wind-icon-stack .bee-popup__wind-dir-icon {
    margin-top: 0 !important;
}

.bee-popup__wind-dir-label {
    font-family: 'Roboto Condensed', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em !important;
    color: #1e2737 !important;
    opacity: 0.88;
    line-height: 1.15 !important;
    margin-top: 4px !important;
    text-align: center !important;
    min-width: 2.25em;
}

/* 4. Stupac za tekst (Labela + Vrijednost) */
.bee-popup__text-column {
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

/* 5. Labele (Temperatura / Vlaga) */
.bee-popup__lbl {
    font-family: 'Roboto Condensed', sans-serif !important;
    font-size: 13px !important;
    color: #1e2737 !important;
    opacity: 0.6;
    margin: 0 !important;
    line-height: 1 !important;
}

/* VELIKA, VISOKA I USKA BROJKA */
.bee-popup__val-huge {
    font-family: 'Roboto Condensed', sans-serif !important;
    font-size: 32px !important; /* Jako veliko */
    font-weight: 600 !important;
    color: #1e2737 !important;
    line-height: 0.9 !important;
    letter-spacing: -2px !important; /* Sužava brojke jednu uz drugu */
    margin-top: 2px !important;
    /* Efekt visokih slova */
    transform: scaleY(1.3); 
    transform-origin: left top !important;
    margin-top: 0px !important;
}

/* 2. Forsiramo desno poravnanje za DRUGI stupac (Vlaga) */
.bee-popup__osnovno-grid > div:nth-child(2) {
    display: flex !important;
    justify-content: flex-end !important; /* Gura cijelu grupu Vlage skroz desno */
    text-align: right !important;
}

/* 3. Osiguravamo da se tekst unutar vlage ne prelama */
.bee-popup__text-column {
    white-space: nowrap !important; /* Zabranjuje prelazak u novi red */
}

/* 4. Ako ikona i dalje "guši" tekst, možemo mrvicu smanjiti ikonu vlage */
.bee-popup__osnovno-grid > div:nth-child(2) .bee-popup__big-icon {
    font-size: 34px !important; /* Mrvicu manja ikona vlage za više mjesta */
}

/* 1. Grid koji drži dva ravnopravna bloka */
.bee-popup__osnovno-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important; /* Gap nam ne treba jer ćemo koristiti justify */
    width: 100% !important;
    align-items: center !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
}

/* 2. Lijevi blok (Temperatura) - drži se lijevo */
.bee-popup__osnovno-grid > div:nth-child(1) {
    display: flex !important;
    justify-content: flex-start !important;
}

/* 3. DESNI BLOK (Vlaga) - gura ga skroz uz desni rub panela */
.bee-popup__main-display--right-side {
    display: flex !important;
    justify-content: flex-end !important; /* Ovo je ključno za razmak u sredini */
    padding-left: 5px; /* Ovo stvara razmak u sredini između Temp i Vlage */
}

/* 4. Osiguravamo da tekst unutar oba stupca ostane uz ikonu */
.bee-popup__text-column {
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important; /* Tekst je uvijek uz ikonu */
    padding-left: 4px;
}

/* Red za tlak i trend */
.bee-popup__pressure-row {
    display: flex !important;
    align-items: flex-start !important;
    gap: 15px !important;
    padding: 5px 0 !important;
}

/* Ikona trenda + dva retka opisa (ista boja kao tekst naslova #1e2737) */
.bee-popup__trend {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 10px !important;
    flex: 1;
    min-width: 0;
}

.bee-popup__trend .bee-popup__trend-icon {
    flex-shrink: 0;
    color: #1e2737 !important;
    font-size: 28px !important;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
    line-height: 1 !important;
}

.bee-popup__trend-copy {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 0;
}

.bee-popup__trend-line1 {
    font-family: 'Roboto Condensed', 'Inter', system-ui, sans-serif !important;
    font-size: 18px !important;
    display: flex !important;bee-popup__dash
    justify-content: center !important; /* Centriranje lijevo-desno */
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #1e2737 !important;
}

.bee-popup__trend-line2 {
    font-family: 'Roboto Condensed', 'Inter', system-ui, sans-serif !important;
    font-size: 18px !important;
    display: flex !important;
    justify-content: center !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    color: #1e2737 !important;
}

/* 2. Poravnanje s naslovom "Tlak zraka" */
.bee-popup__title-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 2px !important;
}

/* Osiguravamo da tlak koristi isti "Tall & Narrow" stil kao temp/vlaga */
#press-id .bee-popup__val-huge {
    font-size: 36px !important; /* Tlak je duži broj (npr. 1013), pa može biti mrvicu manji font */
}