body {
    padding: 0;
    margin: 0;
    font-family: "Arimo", Helvetica, sans-serif;
}

/* ===== NAVBAR ===== */
#main-navbar {
    background: var(--rpp-color-1, #5e893c);
    padding: 6px 0;
    z-index: 1020;
}

.navbar-logo {
    height: 44px;
    width: auto;
}

.navbar-toggler {
    border-color: rgba(255,255,255,0.4);
}
.navbar-toggler-icon {
    filter: invert(1);
}

#main-navbar .nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85) !important;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
#main-navbar .nav-link:hover,
#main-navbar .nav-link.show {
    background: rgba(255,255,255,0.15);
    color: #fff !important;
}

/* ===== LAYER DROPDOWN ===== */
.layer-menu {
    min-width: 280px;
    padding: 8px 0;
    border: none;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    background: #fff !important;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    cursor: pointer;
    transition: background 0.12s;
    margin: 0;
    width: 100%;
    color: #334155;
}
.layer-item:hover {
    background: #f8faf6;
}
.layer-always-on {
    cursor: default;
}
.layer-soon {
    cursor: default;
    opacity: 0.45;
}

.layer-swatch {
    width: 22px;
    height: 4px;
    border-radius: 2px;
    flex-shrink: 0;
    background: #ddd;
}

.layer-name {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.3;
}

.layer-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}
.layer-tag--on {
    background: #dcfce7;
    color: #166534;
}

/* ===== TOGGLE SWITCH ===== */
.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-track {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 22px;
    transition: background 0.2s;
    cursor: pointer;
}
.toggle-track::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-track {
    background: var(--c, #5e893c);
}
.toggle-switch input:checked + .toggle-track::after {
    transform: translateX(18px);
}

/* ===== INTERPRETACIJSKE TOČKE PILL ===== */
.layer-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid rgba(255,255,255,0.35);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    user-select: none;
}
.layer-pill input { display: none; }
.layer-pill:hover {
    border-color: rgba(255,255,255,0.7);
    color: #fff;
}
.pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: background 0.2s;
    flex-shrink: 0;
}
.layer-pill:has(input:checked) {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
}
.layer-pill:has(input:checked) .pill-dot {
    background: var(--c, #fff);
}

#map-container {
    position: relative;
}

/* ===== LOADING OVERLAY ===== */
#map-loader {
    position: absolute;
    inset: 0;
    background: #f8faf6;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s, visibility 0.4s;
}
#map-loader.hidden {
    opacity: 0;
    visibility: hidden;
}
.map-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: #5e893c;
}
.map-loader-inner .fa-spinner {
    font-size: 2.5rem;
}
.map-loader-inner span {
    font-size: 0.9rem;
    color: #64748b;
    font-family: "Arimo", Helvetica, sans-serif;
}

#map {
    height: calc(100dvh - var(--navbar-height, 57px));
    width: 100%;
}

#rpp1 {
    position: absolute;
    z-index: 1000;
    bottom: 0;
    right: 0;
    background: #fff;
    color: #000;
    padding: 1em;
    display: none;
}

#karta-vremenska-napoved,
#karta-legenda {
    position: absolute;
    z-index: 1000;
    top: 10px;
    right: 50px;
    background: #fff;
    padding: 1em;
    display: none;
    border: 1px solid #ccc;
    border-radius: 6px;
}

#karta-vremenska-napoved { max-width: 380px; }
#karta-legenda           { max-width: 250px; }

#karta-vremenska-napoved h5,
#karta-legenda h5 {
    padding-right: 20px;
    margin-bottom: 8px;
}

#vreme-karta-close-button,
#legenda-karta-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.1rem;
    line-height: 1;
    color: #999;
    text-decoration: none;
}

#vreme-karta-close-button:hover,
#legenda-karta-close-button:hover {
    color: #333;
}

.poi_menu {
    cursor: pointer;
    padding: 6px 4px;
    border-bottom: 1px solid #eee;
}

.poi_menu:hover {
    background: #f5f5f5;
}

.poi-photo-menu {
    max-width: 100%;
    height: 80px;
    object-fit: cover;
}

.poi-photo-popup {
    max-width: 200px;
}

/* ===== SHARE TOAST ===== */
#map-toast {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(30,30,30,0.9);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 1005;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
}
#map-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== INFO PANEL ===== */
#info-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1010;
}

#info-panel-tab {
    background: var(--rpp-color-1, #5e893c);
    color: #fff;
    padding: 8px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: background 0.15s;
}
#info-panel-tab:hover {
    background: #4a6e2e;
}
#info-panel-tab a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.15s;
}
#info-panel-tab a:hover {
    color: #fff;
}

#info-panel-chevron {
    transition: transform 0.3s;
    font-size: 0.8rem;
}
#info-panel-chevron.open {
    transform: rotate(180deg);
}

#info-panel-content {
    display: none;
    background: #fff;
    border-top: 3px solid var(--rpp-color-2, #bab85c);
    max-height: 35vh;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #334155;
}

/* ===== ARSO WEATHER ===== */
.arso-loading {
    text-align: center;
    padding: 16px;
    color: #666;
    font-size: 0.85rem;
}
.arso-error {
    padding: 8px;
    font-size: 0.82rem;
    color: #888;
}
.arso-table {
    width: 100%;
    font-size: 0.8rem;
    border-collapse: collapse;
    margin-top: 6px;
}
.arso-table th, .arso-table td {
    padding: 5px 6px;
    text-align: center;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.arso-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.75rem;
}
.arso-table td:first-child {
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}
.arso-table img {
    width: 26px;
    height: 26px;
    display: block;
    margin: 2px auto;
}
.arso-footer {
    text-align: center;
    margin-top: 10px;
}
.arso-logo-img {
    max-width: 120px;
    height: auto;
    filter: brightness(0);
    opacity: 0.5;
    transition: opacity 0.15s;
}
.arso-logo-img:hover {
    opacity: 0.8;
}

.legenda-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 3px 0;
    font-size: .8em;
}

.legenda-swatch {
    display: inline-block;
    width: 20px;
    flex-shrink: 0;
    border-radius: 2px;
}

.legenda-swatch--line {
    height: 3px;
}

.legenda-swatch--area {
    height: 10px;
}

.legenda-swatch--dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== SCALE (MERILO) ===== */
.merilo-control {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.78rem;
    font-family: "Arimo", Helvetica, sans-serif;
    color: #334155;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    margin-bottom: 52px !important;
    margin-right: 8px !important;
    white-space: nowrap;
    pointer-events: all;
    cursor: pointer;
    z-index: 1000;
}
.merilo-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 1px;
}
.merilo-toggle {
    font-size: 0.7rem;
    opacity: 0.5;
    vertical-align: middle;
}
.merilo-control:hover .merilo-toggle {
    opacity: 1;
}

/* ===== POPUP ===== */
.tocka-popup .leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    padding: 0;
}
.tocka-popup .leaflet-popup-content {
    margin: 0;
}
.tocka-popup .leaflet-popup-tip-container {
    display: none;
}
.tocka-popup-inner {
    position: relative;
    font-family: "Arimo", Helvetica, sans-serif;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #334155;
    overflow: hidden;
    border-radius: 10px;
}
.tocka-popup-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}
.tocka-popup-img-placeholder {
    width: 100%;
    height: 80px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5e893c;
    font-size: 2rem;
}
.tocka-popup-body {
    padding: 12px 40px 12px 14px;
}
.tocka-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.45);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 1rem;
    line-height: 24px;
    text-align: center;
    color: #fff;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    transition: background 0.15s;
}
.tocka-popup-close:hover {
    background: rgba(0,0,0,0.7);
}
.popup-more-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: #5e893c;
    text-decoration: none;
    font-weight: 600;
}
.popup-more-link:hover {
    text-decoration: none;
    color: #4a6e2e;
}

/* ===== MY LOCATION DOT ===== */
.my-location-dot {
    width: 16px;
    height: 16px;
    background: #2563eb;
    border: 2.5px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
    position: relative;
}
.my-location-pulse {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: rgba(37,99,235,0.2);
    animation: loc-pulse 2s ease-out infinite;
}
@keyframes loc-pulse {
    0%   { transform: scale(0.6); opacity: 0.8; }
    70%  { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ===== INTERPRETACIJSKE TOČKE MARKER ===== */
.marker-i-icon {
    width: 30px;
    height: 30px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.marker-i-icon .fa-circle-info {
    font-size: 22px;
    color: #5e893c;
}
.marker-i-highlight {
    position: relative;
}
.marker-i-highlight::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 3px solid #5e893c;
    animation: tocka-pulse 1.4s ease-out infinite;
    pointer-events: none;
}
@keyframes tocka-pulse {
    0%   { opacity: 0.9; transform: scale(1); }
    100% { opacity: 0;   transform: scale(1.9); }
}
