@charset "UTF-8";

/* Osiguravamo da stranica zauzima punu visinu */
html, body {
	height: 100%;
	margin: 0;
	overflow: hidden;
	display: flex; 
	flex-direction: column; 
    background-color: #f8f9fa;
}


/* =========================================
   GLAVNI KONTEJNER I MAPA
   ========================================= */
.main-content {
	flex: 1; /* Zauzima sav preostali prostor */
	display: flex;
	overflow: hidden;
	width: 100%;
}

#map {
	flex: 1;
	height: 100%;
    position: relative;
}

/* =========================================
   SIDEBAR I LISTA STANICA
   ========================================= */
.sidebar-list {
	width: 280px; /* Malo prošireno za bolju čitljivost */
	flex-shrink: 0;
	overflow-y: auto; /* Omogućuje skrolanje liste */
	background-color: #ffffff;
	border-left: 1px solid #e9ecef;
    box-shadow: -4px 0 15px rgba(0,0,0,0.03);
    z-index: 5;
}

/* Custom Scrollbar za Sidebar */
.sidebar-list::-webkit-scrollbar {
    width: 6px;
}
.sidebar-list::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
.sidebar-list::-webkit-scrollbar-thumb {
    background: #c1c9d1; 
    border-radius: 4px;
}
.sidebar-list::-webkit-scrollbar-thumb:hover {
    background: #004a99; 
}

/* Modernizacija stavki u listi */
#station-list .list-group-item {
	font-size: 0.95em !important;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 15px;
    transition: all 0.2s ease-in-out;
}

#station-list .list-group-item:hover {
    filter: brightness(0.95);
    transform: translateX(4px);
}

/* =========================================
   MAP OVERLAYS (GLASSMORPHISM)
   ========================================= */
.popup {
	background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
	padding: 8px 12px;
	border: 1px solid rgba(0,0,0,0.1);
	border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

#eaqi-legend {
    position: absolute;
    bottom: 30px;
    right: 15px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.5); /* Poluprozirno */
    backdrop-filter: blur(8px); /* Stakleni efekt */
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255,255,255,0.5);
    font-size: 0.9em;
    pointer-events: auto;
    width: 180px;
}

.legend-item {
	display: flex;
	align-items: center;
	margin-bottom: 8px;
    font-weight: 500;
    color: #444;
}

.legend-item:last-child {
	margin-bottom: 0;
}

.legend-color {
	width: 14px;
	height: 14px;
	border-radius: 4px; /* Suptilni kvadratići umjesto oštrih rubova */
	margin-right: 12px;
	border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#layer-switcher {
	position: absolute;
	top: 15px; 
	right: 15px; 
	z-index: 1000; 
	background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
	padding: 12px 18px;
	border-radius: 12px; 
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255,255,255,0.5);
	font-family: inherit; /* Nasljeđuje moderan font aplikacije */
	font-size: 14px;
}

.map-disclaimer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-left: 5px solid #004a99;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    z-index: 1000;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    text-align: center;
    pointer-events: none;
}

/* =========================================
   OSTALO
   ========================================= */
.rpt-icon-btn {
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease-in-out;
}

.rpt-icon-btn:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd !important;
    color: #0d6efd;
    transform: translateX(4px);
}

.rpt-icon-btn i {
    width: 20px;
    text-align: center;
}


.text-clamp-3 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* =========================================
   MOBILNI PRIKAZ
   ========================================= */
@media (max-width: 991.98px) {
  
    .main-content {
        flex-direction: column !important;
        display: flex !important;
        height: 100% !important;
    }

    #map-filter-panel-mobile {
     	background-color: #ffffff; /* Čistija bijela boja */
        border-bottom: 1px solid #e9ecef;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        display: flex !important;
        width: 100% !important;
        flex-shrink: 0 !important; 
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        padding: 10px !important;
    }
   
    #map {
        flex: 1 !important;
        width: 100% !important;
        height: 100% !important;
    }

    .sidebar-list,
    #layer-switcher,
    .ol-zoom,
    .f-content {
        display: none !important;
    }
    
    #f-filter-pollutant-mobile,
    #f-filter-hour-mobile {
        background-color: #f8f9fa; /* Suptilnija pozadina polja */
        color: #004a99;
        border: 1px solid #cce5ff;
        font-weight: 500;
        border-radius: 6px;
    }
}

/* =========================================
   BOJE I BEDŽEVI ZA LISTU STANICA
   ========================================= */
.modern-station-item {
    position: relative;
    display: flex;
    align-items: center;
}

/* Obojena linija s lijeve strane */
.modern-station-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background-color: var(--eaqi-color, #ccc); 
}

/* Stil za ikonice (drvo/industrija) */
.modern-station-item i {
    color: #8fa0b3;
    margin-right: 10px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    transition: color 0.2s ease;
}

/* Ikonica preuzima boju zraka na hover */
.modern-station-item:hover i {
    color: var(--eaqi-color, #004a99);
}

/* Obojeni krugić (bedž) s desne strane */
.eaqi-badge {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--eaqi-color, #ccc);
    margin-left: auto; /* Gura bedž skroz desno */
    box-shadow: 0 0 0 2px rgba(255,255,255,0.9), 0 0 5px var(--eaqi-color, #ccc);
}


/* =========================================
   OPENLAYERS KONTROLE (ZUMIRANJE)
   ========================================= */
.ol-zoom.ol-control {
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    padding: 5px !important;
    top: 15px !important;
    left: 15px !important;
}

/* Pojedinačna dugmad (+ i -) */
.ol-zoom.ol-control button {
    background-color: transparent !important;
    color: #444 !important;
    font-size: 1.4rem !important;
    font-weight: bold !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 2px 0 !important;
}

/* Hover efekat na dugmadima */
.ol-zoom.ol-control button:hover {
    background-color: #004a99 !important;
    color: #fff !important;
    transform: scale(1.05);
}


/* =========================================
   MODAL (DETALJI STANICE)
   ========================================= */
/* Osnovni izgled modala (zaobljeni rubovi i mekana sjenka) */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 700;
    color: #004a99;
}

/* Uljepšan EAQI indikator u modalu */
#s-eaqi {
    font-weight: 700;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #fff !important;
    text-shadow: 0px 1px 3px rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.6);
    padding: 0.8rem !important;
    letter-spacing: 0.5px;
}

/* Modernizacija navigacije (Tabovi) */
.nav-underline {
    border-bottom: 1px solid #e9ecef;
}

.nav-underline .nav-link {
    color: #6c757d;
    font-weight: 600;
    padding: 0.85rem 1.25rem;
    border-bottom-width: 3px;
    transition: all 0.2s ease;
}

.nav-underline .nav-link:hover {
    color: #004a99;
    background-color: #f8f9fa;
    border-radius: 6px 6px 0 0;
}

.nav-underline .nav-link.active {
    color: #004a99;
    border-bottom-color: #004a99;
}

#s-m-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

#s-m-table th {
    background-color: #f1f3f5;
    color: #495057;
    font-weight: 700;
    padding: 8px 12px;
    border-bottom: 2px solid #dee2e6;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

#s-m-table td {
    padding: 8px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f5;
    font-weight: 500;
}

#s-m-table tbody tr:last-child td {
    border-bottom: none;
}

.eaqi-legend-container {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

.eaqi-legend-container {
    display: block; 
}

@media (min-width: 768px) {
    .eaqi-legend-container { 
        display: none !important; 
    }
}

.eaqi-legend-container:hover {
    background: transparent !important;
}

#eaqi-legend {
    display: none; 
    margin-top: 10px;
}

#eaqi-legend-toggle {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 1000;
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* --- VEĆI EKRANI (Tableti i Desktop, npr. iznad 768px) --- */
@media (min-width: 768px) {
    #eaqi-legend {
        display: block !important; 
    }
    
    #eaqi-legend-toggle {
        display: none; 
    }
}

.ol-tooltip {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
    pointer-events: none;
    display: none; 
    white-space: nowrap;
    z-index: 1000;
}

.skeleton-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #ffffff;
}

.skeleton-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background-color: #e9ecef; 
}

.skeleton-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 10px;
}

.skeleton-text {
    height: 14px;
    border-radius: 4px;
    flex: 1;
    margin-right: 15px;
}

.skeleton-badge {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: auto;
}

.skeleton-shimmer {
    animation: shimmer 1.5s infinite linear;
    background: linear-gradient(to right, #f6f7f8 4%, #edeef1 25%, #f6f7f8 36%);
    background-size: 1000px 100%;
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}