/* index.css - Styling for the main map page */

/* Main container styling */
.main-container {
    padding: 0 15px;
}

/* Layer sidebar styling - Width reduced to col-lg-3 */
.layer-sidebar {
    background-color: #f8f9fa;
    padding-right: 15px;
    overflow-y: auto;
}

.layer-sidebar .card {
    border-radius: 8px;
}

/* Map container styling */
#map-container {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#map {
    height: 100%;
    width: 100%;
    border-radius: 8px;
}

#loading {
    display: none;
    z-index: 1000;
}

/* Styling for layer control in sidebar - Adjusted for narrower panel */
.base-layers, .overlay-layers {
    margin-bottom: 15px;
}

.base-layers h6, .overlay-layers h6 {
    color: #417690;
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
}

.country-group {
    border-left: 2px solid #417690;
    padding-left: 8px;
    margin-bottom: 12px;
}

.country-title {
    color: #417690;
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.color-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-left: 4px;
    vertical-align: middle;
}

.overlays-container {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 8px;
}

.form-check {
    margin-bottom: 6px;
}

.form-check-label {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
}

.form-check-input {
    margin-top: 0;
    margin-right: 6px;
}

/* Legend styling - Adjusted for narrower panel */
.legend-container {
    border-top: 1px solid #dee2e6;
    padding-top: 12px;
}

.legend-container h6 {
    color: #417690;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.75rem;
}

.legend-item .color-indicator {
    margin-right: 6px;
    margin-left: 0;
    flex-shrink: 0;
}

/* Styling for supporter logos on mobile */
.support-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}

.support-logo {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
}

/* ========== IDENTIFICATION DIALOG (ONCLICK) - 50% SMALLER ========== */
.map-popup {
    max-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    font-size: 50%;
    line-height: 1.2;
}

.map-popup h4 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 3px;
    font-size: 1.6em;
    margin-bottom: 5px;
    font-weight: bold;
}

.map-popup h5 {
    margin-top: 0;
    color: #333;
    padding-bottom: 2px;
    font-size: 1.4em;
    margin-bottom: 4px;
    font-weight: bold;
}

.map-popup p {
    margin: 3px 0;
    font-size: 1.2em;
}

.map-popup strong {
    font-weight: bold;
}

/* ========== OTHER STYLES ========== */

/* Custom measurement tooltip styles */
.custom-measure-tooltip {
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid #333;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    pointer-events: none;
}

/* Geoman measurement control styles */
.leaflet-pm-toolbar {
    margin-top: 10px;
}

.leaflet-pm-toolbar .leaflet-buttons-control-button {
    padding: 5px;
    box-sizing: border-box;
    margin: 2px;
}

.leaflet-pm-toolbar .control-icon {
    width: 100%;
    height: 100%;
}

.icon-area-measure:before {
    content: "🟦";
}

.icon-length-measure:before {
    content: "📏";
}

.icon-clear-measure:before {
    content: "❌";
}

/* Responsive styles */
@media (max-width: 1200px) {
    .col-xxl-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .layer-sidebar {
        padding-right: 0;
        margin-bottom: 15px;
    }
    
    .main-container {
        padding: 0 10px;
    }
}

@media (max-width: 768px) {
    .layer-sidebar {
        height: auto !important;
        max-height: 300px;
        margin-bottom: 15px;
    }
    
    #map-container {
        height: 50vh !important;
    }
    
    .overlays-container {
        max-height: 200px;
    }
    
    .map-popup {
        max-width: 180px;
        max-height: 250px;
        font-size: 45%;
    }
    
    .map-popup h4 {
        font-size: 1.6em;
    }
    
    .map-popup h5 {
        font-size: 1.4em;
    }
    
    .map-popup p {
        font-size: 1.2em;
    }
    
    .support-logo {
        max-height: 60px;
    }
    
    .support-logo-container {
        margin: 15px 0;
    }
}

@media (max-width: 576px) {
    .main-container {
        padding: 0 5px;
    }
    
    .map-popup {
        max-width: 160px;
        font-size: 40%;
    }
    
    .map-popup h4 {
        font-size: 1.6em;
    }
    
    .map-popup h5 {
        font-size: 1.4em;
    }
    
    .map-popup p {
        font-size: 1.2em;
    }
    
    .support-logo {
        max-height: 50px;
    }
    
    .support-logo-container {
        margin: 20px 0;
    }
    
    .support-logo-container p {
        margin-bottom: 5px !important;
        font-size: 14px;
    }
    
    .country-group {
        padding-left: 5px;
    }
    
    .form-check-label {
        font-size: 0.7rem;
    }
    
    .base-layers h6, .overlay-layers h6 {
        font-size: 0.75rem;
    }
    
    .legend-container h6 {
        font-size: 0.7rem;
    }
}

/* Additional styling to match page.html */
.text-primary {
    color: #417690 !important;
}

.card-title {
    border-bottom: 2px solid #417690;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Ensure proper height calculation */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

.container-fluid.px-0 {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Scrollbar styling for webkit browsers */
.overlays-container::-webkit-scrollbar {
    width: 6px;
}

.overlays-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.overlays-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.overlays-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Hover effects for better usability */
.form-check-input:hover {
    cursor: pointer;
}

.form-check-label:hover {
    cursor: pointer;
    color: #417690;
}

.country-title:hover {
    cursor: default;
}

/* Focus styles for accessibility */
.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(65, 118, 144, 0.25);
    border-color: #417690;
}

/* Animation for smooth transitions */
.layer-sidebar, #map-container {
    transition: all 0.3s ease;
}

/* Print styles */
@media print {
    .layer-sidebar {
        display: none;
    }
    
    .main-container .col-lg-10 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}


/* per top most of zoom controls */
/* index.css - shtoni në fund */

/* Kontrollo z-index-in e kontrolleve të Leaflet */
.leaflet-control-container {
    z-index: 1000 !important;
}

.leaflet-control-container .leaflet-top {
    z-index: 1000 !important;
}

.leaflet-control-container .leaflet-control {
    z-index: 1000 !important;
}

.leaflet-control-container .leaflet-bar {
    z-index: 1000 !important;
}

.leaflet-control-zoom,
.leaflet-pm-toolbar {
    z-index: 1000 !important;
}

/* Sigurohuni që navbar të jetë gjithmonë mbi kontrollet e Leaflet */
.navbar {
    z-index: 2000 !important;
    position: relative;
}

/* Rregullime specifike për kontrollet e Leaflet */
.leaflet-top.leaflet-left {
    z-index: 999 !important;
}

.leaflet-control-zoom.leaflet-bar.leaflet-control {
    z-index: 999 !important;
}

.leaflet-bar.leaflet-control.leaflet-pm-toolbar {
    z-index: 999 !important;
}

.leaflet-control-attribution.leaflet-control {
    z-index: 999 !important;
}