/* ==========================================================================
   KOMPLETNY PLIK STYLI LEAFLET MAP (Z FORCE OVERRIDE !IMPORTANT)
   ========================================================================== */

/* 1. Import oryginalnego pliku Leaflet v1.9.4 */
@import url('https://unpkg.com/leaflet@1.9.4/dist/leaflet.css');

/* 2. Zmienne konfiguracyjne */
:root {
    --leaflet-radius: 12px;
    --leaflet-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    --leaflet-primary: #0066cc;
    --leaflet-bg: #ffffff;
    --leaflet-text: #2c3e50;
    --leaflet-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* 3. Główny kontener mapy */
#map, 
.leaflet-container {
    width: 100% !important;
    height: 500px !important;
    border-radius: var(--leaflet-radius) !important;
    box-shadow: var(--leaflet-shadow) !important;
    font-family: var(--leaflet-font) !important;
    z-index: 1 !important;
    overflow: hidden !important;
    border: none !important;
}

/* 4. Przyciski powiększenia (Zoom) i nawigacji */
.leaflet-control-zoom,
.leaflet-control-layers {
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.leaflet-control-zoom a,
.leaflet-control-layers-toggle {
    background-color: var(--leaflet-bg) !important;
    color: var(--leaflet-text) !important;
    border-bottom: 1px solid #f0f0f0 !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
}

.leaflet-control-zoom a:hover {
    background-color: #f8f9fa !important;
    color: var(--leaflet-primary) !important;
}

.leaflet-control-zoom-in {
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
}

.leaflet-control-zoom-out {
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    border-bottom: none !important;
}

/* 5. Dymki informacyjne (Popup) */
.leaflet-popup-content-wrapper {
    background: var(--leaflet-bg) !important;
    color: var(--leaflet-text) !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18) !important;
    padding: 4px !important;
    font-family: var(--leaflet-font) !important;
}

.leaflet-popup-content {
    margin: 12px 16px !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

.leaflet-popup-content b, 
.leaflet-popup-content strong {
    color: #111827 !important;
    font-size: 15px !important;
}

.leaflet-popup-tip {
    background: var(--leaflet-bg) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-container a.leaflet-popup-close-button {
    color: #9ca3af !important;
    padding: 8px !important;
    font-size: 16px !important;
    transition: color 0.2s ease !important;
}

.leaflet-container a.leaflet-popup-close-button:hover {
    color: #ef4444 !important;
}

/* 6. Etykiety tekstowe (Tooltips) */
.leaflet-tooltip {
    background: rgba(17, 24, 39, 0.9) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    font-family: var(--leaflet-font) !important;
    font-size: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.leaflet-tooltip-top:before { border-top-color: rgba(17, 24, 39, 0.9) !important; }
.leaflet-tooltip-bottom:before { border-bottom-color: rgba(17, 24, 39, 0.9) !important; }
.leaflet-tooltip-left:before { border-left-color: rgba(17, 24, 39, 0.9) !important; }
.leaflet-tooltip-right:before { border-right-color: rgba(17, 24, 39, 0.9) !important; }

/* 7. Pasek praw autorskich (Attribution) */
.leaflet-container .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(4px) !important;
    font-size: 11px !important;
    color: #6b7280 !important;
    padding: 2px 8px !important;
    border-top-left-radius: 6px !important;
}

/* 8. Dostosowanie do urządzeń mobilnych */
@media (max-width: 768px) {
    #map, 
    .leaflet-container {
        height: 380px !important;
        border-radius: 8px !important;
    }
}