body {
    padding-top: 56px;
    /* Height of navbar */
    margin: 0;
    overflow: hidden;
}

#map {
    height: calc(100vh - 56px);
    width: 100%;
    z-index: 1;
}

/* --- SIDEBAR (PC vs Mobile) --- */
/* Domyślnie (Mobile) - zachowuje się jak Offcanvas Bootstrapa */
.offcanvas-start {
    top: 56px;
    width: 320px;
}

/* Na PC (Large screens) - stały panel boczny */
@media (min-width: 992px) {
    .offcanvas-start {
        transform: none !important;
        visibility: visible !important;
        top: 56px;
        bottom: 0;
        height: auto;
        /* Wypełnij do dołu */
        border-right: 1px solid #dee2e6;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
        z-index: 1000;
        /* Poniżej modali, ale nad mapą (mapa zostanie przesunięta) */
    }

    .offcanvas-header .btn-close {
        display: none;
        /* Ukryj przycisk zamknij na PC */
    }

    /* Przesuwamy mapę i elementy sterujące, gdy sidebar jest widoczny */
    body.desktop-mode #map {
        margin-left: 320px;
        width: calc(100% - 320px);
    }

    body.desktop-mode .leaflet-control-container .leaflet-left {
        left: 10px;
        /* Leaflet domyślnie pozycjonuje względem kontenera mapy, więc jest ok */
    }

    /* Ukrywamy przycisk "Filtry" na pasku nawigacji na PC */
    .navbar-toggler-sidebar {
        display: none !important;
    }
}

/* --- SEARCH BAR --- */
.search-container {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    /* Nad mapą */
    width: 90%;
    max-width: 400px;
}

@media (min-width: 992px) {
    .search-container {
        left: calc(50% + 160px);
        /* Korekta o połowę szerokości sidebara */
    }
}

/* --- LOCATION BUTTON --- */
/* --- LOCATION BUTTONS --- */
.map-controls {
    position: absolute;
    bottom: 30px;
    right: 20px;
    z-index: 1000;
    /* Nad mapą */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.map-controls .btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- FOOTER --- */
.footer-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 320px;
    /* Szerokość sidebara */
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-size: 0.75rem;
    padding: 5px 10px;
    text-align: center;
    color: #6c757d;
    z-index: 1002;
    display: none;
    /* Domyślnie ukryte na mobile (jest w offcanvas body) */
}

@media (min-width: 992px) {
    .footer-info {
        display: block;
    }
}

/* Loading indicator overlay */
#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    display: none;
}

/* Custom Cluster Icon - Pie Chart */
.pie-cluster {
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 12px;
    text-shadow: 0 0 2px #000;
}

/* Legend colors helpers */
.text-orange {
    color: #FF7900;
}

.text-tmobile {
    color: #E20074;
}

.text-plus {
    color: #009639;
}

.text-play {
    color: #5c2d91;
}

/* Station Modal Styles */
.station-header {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.band-badge {
    font-size: 0.9em;
    margin-right: 5px;
    margin-bottom: 5px;
}

.expired {
    text-decoration: line-through;
    color: red;
}

/* Rich Tooltip */
.rich-tooltip {
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 0;
}

.rich-tooltip .leaflet-tooltip-content {
    margin: 0;
    padding: 10px;
}

.station-tooltip-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}