html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
}

#map {
    width: 100%;
    height: 100vh; /* Full height since navbar is now transparent overlay */
    margin: 0;
    padding: 0;
    z-index: 1;
}

/* Sidebar styling */
.bg-light {
    background-color: #f8f9fa !important;
    border-right: 1px solid #dee2e6;
}

/* Button styling */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Map controls styling - AGGRESSIVE BUTTON ORDER FIX */
.leaflet-control-easybutton {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1001 !important;
}

/* Force More Info button to appear above Clear Markers button */
.leaflet-control-mapmoreinfo {
    order: 1 !important;
    z-index: 1002 !important;
}

.leaflet-control-mapmoreinfo .leaflet-control-easybutton {
    z-index: 1002 !important;
}

/* Force Clear Markers button to appear below More Info button */
.leaflet-control-mapclearmarkers {
    order: 2 !important;
    z-index: 1001 !important;
}

.leaflet-control-mapclearmarkers .leaflet-control-easybutton {
    z-index: 1001 !important;
}

/* Force top-right container to use flexbox for proper ordering */
.leaflet-top.leaflet-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
}

/* Ensure proper stacking order */
.leaflet-control-mapmoreinfo {
    order: 1 !important;
}

.leaflet-control-mapclearmarkers {
    order: 2 !important;
}

.leaflet-control-easybutton:hover {
    background-color: #f5f5f5;
}

/* Enhanced marker and cluster styling for better visibility */
.marker-cluster {
    background-clip: padding-box;
    border-radius: 20px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    border: 2px solid #fff;
    font-weight: bold;
    text-align: center;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.marker-cluster-small {
    background-color: rgba(181, 226, 140, 0.8);
}

.marker-cluster-medium {
    background-color: rgba(241, 211, 87, 0.8);
}

.marker-cluster-large {
    background-color: rgba(253, 156, 115, 0.8);
}

/* Enhanced marker hover effects */
.leaflet-marker-icon:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
    z-index: 1000 !important;
}

/* Better popup styling */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.leaflet-popup-content {
    margin: 8px 12px;
    line-height: 1.4;
}

/* Position EasyButtons for Quick Info and More Info */
.leaflet-top.leaflet-left {
    margin-top: 125px !important; /* Space for zoom controls + quick info button */
}

.leaflet-top.leaflet-right {
    margin-top: 125px !important; /* Space for layer controls + more info button */
}

/* Custom positioning for info buttons */
.leaflet-control-mapquickinfo,
.leaflet-control-mapmoreinfo {
    margin-top: 10px !important;
}

/* Specific styling for info buttons */
.leaflet-control-mapquickinfo .leaflet-control-easybutton,
.leaflet-control-mapmoreinfo .leaflet-control-easybutton {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
}

.leaflet-control-mapquickinfo .leaflet-control-easybutton:hover,
.leaflet-control-mapmoreinfo .leaflet-control-easybutton:hover {
    background-color: #0056b3 !important;
    border-color: #0056b3 !important;
    color: white !important;
}

/* Ensure all leaflet controls are accessible */
.leaflet-control {
    z-index: 1001 !important;
}

.leaflet-top, .leaflet-bottom {
    z-index: 1000 !important;
}

/* Specific zoom control fixes */
.leaflet-control-zoom {
    z-index: 1001 !important;
    pointer-events: auto !important;
}

.leaflet-control-zoom a {
    z-index: 1002 !important;
    pointer-events: auto !important;
    position: relative !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    z-index: 1002 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Fix any potential SVG or click target issues */
.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover {
    background-color: #f4f4f4 !important;
    z-index: 1003 !important;
}

/* Custom marker cluster styling - Enhanced for better visibility */
.marker-cluster {
    background-clip: padding-box;
    border-radius: 20px;
}

.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 15px;
    font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
    font-weight: bold;
    line-height: 30px;
    color: white;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.marker-cluster-small {
    background-color: rgba(181, 226, 140, 0.8);
    border: 2px solid rgba(110, 204, 57, 0.8);
}

.marker-cluster-small div {
    background-color: rgba(110, 204, 57, 0.9);
    border: 1px solid rgba(85, 160, 45, 0.9);
}

.marker-cluster-medium {
    background-color: rgba(241, 211, 87, 0.8);
    border: 2px solid rgba(240, 194, 12, 0.8);
}

.marker-cluster-medium div {
    background-color: rgba(240, 194, 12, 0.9);
    border: 1px solid rgba(200, 160, 10, 0.9);
}

.marker-cluster-large {
    background-color: rgba(253, 156, 115, 0.8);
    border: 2px solid rgba(241, 128, 23, 0.8);
}

.marker-cluster-large div {
    background-color: rgba(241, 128, 23, 0.9);
    border: 1px solid rgba(200, 100, 15, 0.9);
}

/* Ensure cluster markers are always visible and on top */
.marker-cluster {
    z-index: 1000 !important;
}

.marker-cluster div {
    z-index: 1001 !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .col-md-3 {
        position: fixed;
        top: 56px; /* Height of navbar */
        left: -100%;
        width: 80%;
        height: calc(100vh - 56px);
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .col-md-3.show {
        left: 0;
    }
    
    .col-md-9 {
        width: 100%;
    }
}

/* Form controls */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Navigation Bar */
.navbar-transparent {
    background-color: transparent !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999; /* Lower than leaflet controls but still above map */
    pointer-events: none; /* Allow clicks to pass through */
}

.navbar-transparent .container-fluid {
    pointer-events: auto; /* Re-enable pointer events for navbar content */
}

/* Ensure leaflet controls have higher z-index */
.leaflet-control-container {
    z-index: 1000 !important;
}

.leaflet-top .leaflet-control-zoom {
    z-index: 1001 !important;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-text {
    font-size: 0.9rem;
}

/* Country Selector */
#countrySelect {
    min-width: 200px;
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #333 !important;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* Country Selector responsive optimizations */
@media (max-width: 768px) {
    #countrySelect {
        width: 100% !important;
        max-width: none !important;
        min-width: unset !important;
        margin: 0 auto 0.75rem auto;
        order: 1;
    }
}

#countrySelect option {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
}

#countrySelect:focus {
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25) !important;
    outline: none;
}

/* Transparent navbar button enhancements */
.navbar-transparent .btn-outline-light {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #333 !important;
    font-weight: 500;
}

.navbar-transparent .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 1) !important;
    border-color: #007bff !important;
    color: #007bff !important;
}

.navbar-transparent .btn-outline-light:disabled {
    background-color: rgba(255, 255, 255, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: rgba(108, 117, 125, 0.5) !important;
}

.navbar-transparent .navbar-toggler {
    border-color: #ddd;
    background-color: white;
}

.navbar-transparent .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Status Indicator */
.position-fixed {
    z-index: 1050;
}

/* Modal Styling */
.modal-content {
    border: none;
    border-radius: 10px;
}

.modal-header {
    border-radius: 10px 10px 0 0;
}

.modal-footer {
    border-radius: 0 0 10px 10px;
}

/* Loading Spinners */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Table Styling */
.table th {
    border-top: none;
    font-weight: 600;
}

.table td {
    vertical-align: middle;
}

/* Card title word breaking for long text */
.card-title {
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.3;
    overflow-wrap: break-word;
}

/* Modal content responsive text */
.modal-body h4,
.modal-body h5,
.modal-body h6 {
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
}

/* Badge responsive text */
.badge {
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
}

/* Responsive title class for long text */
.responsive-title {
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
    line-height: 1.3;
    max-width: 100%;
}

/* Additional mobile responsive improvements */
@media (max-width: 768px) {
    /* Improve navbar spacing */
    .navbar-expand-lg .navbar-nav {
        margin: 0.5rem 0;
    }
    
    /* Better button spacing in navbar */
    .navbar .d-flex {
        gap: 0.75rem;
    }
    
    /* Ensure dropdown items are touch-friendly */
    .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
    }
    
    /* Improve modal responsiveness */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .modal-dialog-scrollable .modal-body {
        max-height: calc(100vh - 200px);
    }
    
    /* Better card layout on mobile */
    .card-body {
        padding: 1rem 0.75rem;
    }
    
    .card-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    /* Improve table responsiveness */
    .table-responsive {
        border: none;
    }
    
    /* Better spacing for cards in rows */
    .row .col-md-6,
    .row .col-lg-4 {
        margin-bottom: 1rem;
    }
    
    /* Mobile responsive images */
    .responsive-sports-image,
    .responsive-meals-image {
        height: 200px;
        object-fit: contain;
        object-position: center;
    }
    
    /* Mobile card improvements */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-img-top {
        border-radius: 0.375rem 0.375rem 0 0;
    }
}

/* Weather Icons */
.weather-icon {
    width: 50px;
    height: 50px;
}

/* Wikipedia Content */
.wikipedia-content {
    max-height: 60vh;
    overflow-y: auto;
}

.wikipedia-summary {
    line-height: 1.6;
    text-align: justify;
}

/* Images Gallery */
.images-gallery .card {
    transition: transform 0.2s ease-in-out;
}

.images-gallery .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.images-gallery .card-img-top {
    transition: opacity 0.2s ease-in-out;
}

.images-gallery .card-img-top:hover {
    opacity: 0.9;
}

/* Responsive Sports and Meals Images */
.responsive-sports-image,
.responsive-meals-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    object-position: center;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,.125);
    transition: transform 0.2s ease-in-out;
}

.responsive-sports-image:hover,
.responsive-meals-image:hover {
    transform: scale(1.02);
}

/* Desktop dropdown positioning fix */
@media (min-width: 769px) {
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        min-width: 220px;
        max-width: 280px;
        padding: 0.5rem 0;
        margin: 0.125rem 0 0;
        font-size: 1rem;
        color: #212529;
        text-align: left;
        list-style: none;
        background-color: #fff;
        background-clip: padding-box;
        border: 1px solid rgba(0,0,0,.15);
        border-radius: 0.375rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
        white-space: nowrap;
        overflow-x: visible;
    }
    
    /* Dropdown items with proper text wrapping */
    .dropdown-menu .dropdown-item {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0.5rem 1rem;
        display: flex;
        align-items: center;
        min-width: 0;
        max-width: 100%;
    }
    
    /* Ensure dropdown doesn't go beyond viewport on desktop */
    .dropdown-menu.show {
        max-width: 280px;
        right: auto;
        left: auto;
        transform: translateX(0);
    }
    
    /* Smart positioning - if dropdown would go beyond viewport, align to right */
    .navbar .dropdown-menu {
        right: 0;
        left: auto;
        transform: translateX(0);
    }
}

/* Flag Images */
.flag-img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 2px;
}

/* Flag Emoji Rendering */
.flag-emoji {
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'EmojiOne', 'Twemoji', sans-serif;
    font-size: 48px;
    line-height: 1;
    display: block;
    min-height: 48px;
    text-align: center;
}

/* Map Controls */
.leaflet-control-layers {
    border-radius: 5px;
    z-index: 1001 !important;
    position: relative !important;
}

.leaflet-control-layers-toggle {
    background-color: white;
    border-radius: 5px;
    z-index: 1001 !important;
}

/* Fix layer control panel hover behavior */
.leaflet-control-layers-pane {
    z-index: 1002 !important;
}

.leaflet-control-layers-list {
    pointer-events: auto !important;
}

.leaflet-control-layers-overlays,
.leaflet-control-layers-base {
    z-index: 1002 !important;
}

/* Standard Leaflet layer control styling */
.leaflet-control-layers {
    border-radius: 5px !important;
    z-index: 1001 !important;
}

.leaflet-control-layers-toggle {
    background-color: white !important;
    border-radius: 5px !important;
    z-index: 1001 !important;
}

/* Enhanced layer control styling with visual separation */
.leaflet-control-layers .leaflet-control-layers-overlays {
    max-height: 400px !important;
    overflow-y: auto !important;
}

/* Visual separator styling */
.leaflet-control-layers .leaflet-control-layers-overlays div:first-child label {
    border-bottom: 2px solid #dee2e6 !important;
    margin-bottom: 8px !important;
    padding-bottom: 8px !important;
    font-weight: bold !important;
    color: #495057 !important;
    font-size: 13px !important;
}

/* Checkbox section styling */
.leaflet-control-layers .leaflet-control-layers-overlays div:not(:first-child) label {
    padding: 6px 10px !important;
    margin: 2px 0 !important;
    font-size: 12px !important;
    color: #333 !important;
    cursor: pointer !important;
    border-radius: 3px !important;
    transition: background-color 0.2s ease !important;
}

.leaflet-control-layers .leaflet-control-layers-overlays div:not(:first-child) label:hover {
    background-color: #e9ecef !important;
}

/* Checkbox styling - Clean and consistent */
.leaflet-control-layers input[type="checkbox"] {
    margin-right: 10px !important;
    cursor: pointer !important;
    transform: scale(1.1) !important;
    accent-color: #007bff !important;
    flex-shrink: 0 !important;
}


/* CLEAN LAYER CONTROL STYLING - Fix display issues */
.leaflet-control-layers label {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    padding: 8px 12px !important;
    margin: 2px 0 !important;
    border-radius: 4px !important;
    transition: background-color 0.2s ease !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    line-height: 1.4 !important;
    min-height: 32px !important;
    white-space: nowrap !important;
}

.leaflet-control-layers label:hover {
    background-color: #f8f9fa !important;
}

/* Section headers styling */
.leaflet-control-layers-list section {
    margin-bottom: 12px !important;
}

.leaflet-control-layers-list section:last-child {
    margin-bottom: 0 !important;
}

.leaflet-control-layers-list section label:first-child {
    font-weight: bold !important;
    font-size: 14px !important;
    color: #495057 !important;
    border-bottom: 2px solid #dee2e6 !important;
    margin-bottom: 8px !important;
    padding-bottom: 8px !important;
    background: none !important;
    min-height: auto !important;
}

.leaflet-control-layers-list section label:first-child:hover {
    background: none !important;
}

/* Icon container styling */
.leaflet-control-layers-list span[style*="width: 20px"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 10px !important;
    flex-shrink: 0 !important;
}

/* Text span styling */
.leaflet-control-layers-list label span:last-child {
    flex: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Hover effects for better UX */
.leaflet-control-layers-list label:hover {
    background-color: #f8f9fa !important;
    transform: translateX(2px) !important;
    transition: all 0.2s ease !important;
}

/* Ensure proper spacing between sections */
.leaflet-control-layers-list section + section {
    margin-top: 16px !important;
    padding-top: 16px !important;
    border-top: 1px solid #e9ecef !important;
}

/* Enhanced basemap section styling */
.leaflet-control-layers-list section:first-child {
    border-bottom: 1px solid #e9ecef !important;
    padding-bottom: 12px !important;
    margin-bottom: 12px !important;
}

/* Basemap option styling */
.leaflet-control-layers-list section:first-child label:not(:first-child) {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 4px !important;
    margin: 2px 0 !important;
    padding: 8px 12px !important;
    transition: all 0.2s ease !important;
}

.leaflet-control-layers-list section:first-child label:not(:first-child):hover {
    background: #e3f2fd !important;
    border-color: #007bff !important;
    box-shadow: 0 2px 4px rgba(0,123,255,0.2) !important;
}

/* Prevent navbar from interfering with zoom controls specifically */
.navbar-transparent {
    pointer-events: none !important;
}

.navbar-transparent .container-fluid,
.navbar-transparent .navbar-brand,
.navbar-transparent .navbar-nav,
.navbar-transparent .btn-group,
.navbar-transparent .dropdown-menu,
.navbar-transparent select,
.navbar-transparent button {
    pointer-events: auto !important;
}

/* Custom Markers */
.custom-marker {
    background: white;
    border: 2px solid #007bff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
}

/* Tablets */
@media (max-width: 1024px) and (min-width: 769px) {
    /* Tablet - keep navbar controls centered but allow zoom access */
    .navbar-transparent {
        pointer-events: none;
    }
    
    .navbar .container-fluid {
        position: relative;
    }
    
    .navbar-toggler {
        pointer-events: auto;
        position: absolute;
        top: 15px;
        right: 15px;
        z-index: 1001;
        background-color: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
        backdrop-filter: blur(16px);
    }
    
    /* Ensure leaflet zoom controls are accessible */
    .leaflet-control-zoom {
        z-index: 1002 !important;
        pointer-events: auto !important;
    }
    
    /* Push navbar collapse below toggle button */
    .navbar-collapse {
        margin-top: 80px;
    }
}

/* Mobile devices (768px and below) */
@media (max-width: 768px) {
    /* Mobile navbar layout */
    .navbar .container-fluid {
        position: relative;
        flex-direction: column;
        align-items: center;
        padding: 0;
        width: 100%;
        max-width: 100%;
    }
    
    /* Fix navbar toggler positioning */
    .navbar-toggler {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 1001;
        background-color: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 6px !important;
        padding: 8px 12px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
        backdrop-filter: blur(16px);
    }
    
    /* Bootstrap navbar collapse - hide by default */
    .navbar-expand-lg .navbar-collapse {
        display: none !important;
    }
    
    /* Show when toggled */
    .navbar-expand-lg .navbar-collapse.show {
        display: flex !important;
        flex-direction: column !important;
        width: 100%;
    }
    
    .navbar-expand-lg .navbar-nav {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    
    /* Ensure zoom controls are accessible in top-right corner on mobile */
    .leaflet-top.leaflet-left {
        margin-top: 65px !important; /* Push zoom controls below repositioned toggle */
    }
    
    /* Ensure zoom controls are always visible and clickable */
    .leaflet-control-zoom {
        pointer-events: auto !important;
        z-index: 1002 !important;
    }
    
    /* Mobile navbar collapse styling */
    .navbar-transparent .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.95);
        border-radius: 12px;
        margin-top: 80px;
        padding: 16px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(16px);
        width: calc(100% - 32px);
        max-width: calc(100vw - 32px);
        margin-left: auto;
        margin-right: auto;
        position: relative;
        z-index: 1000;
        overflow-x: hidden;
        display: none; /* Hidden by default */
    }
    
    /* Show navbar collapse when toggled */
    .navbar-transparent .navbar-collapse.show {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Navbar content styling */
    .navbar-nav {
        width: 100%;
        margin: 0;
    }
    
    .navbar-nav .d-flex {
        flex-direction: column !important;
        width: 100% !important;
        gap: 12px;
        align-items: stretch;
        justify-content: center;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .navbar-nav .d-flex > * {
        width: 100% !important;
        margin: 0 !important;
        text-align: center;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* Override inline styles on mobile */
    .form-select[style*="width: auto"] {
        width: calc(100% - 2px) !important;
    }
    
    #countrySelect {
        width: calc(100% - 2px) !important;
        min-width: calc(100% - 2px) !important;
        max-width: calc(100% - 2px) !important;
        font-size: 0.85rem;
        margin: 0 auto !important;
        order: 1;
        background-color: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        color: #333 !important;
        backdrop-filter: blur(10px);
        padding: 8px 12px; /* Further reduced padding */
        min-height: 36px; /* Smaller height */
        max-height: 36px; /* Fixed smaller height */
        display: block !important;
        border-radius: 6px;
        font-weight: 500;
        box-sizing: border-box;
        overflow: hidden;
        visibility: visible !important;
    }
    
    #countrySelect option {
        background-color: rgba(255, 255, 255, 0.95) !important;
        color: #333 !important;
    }
    
    .btn-group {
        width: 100% !important;
        display: block !important;
        order: 3 !important;
        margin: 0 !important;
    }
    
    .btn-group .dropdown-toggle {
        width: 100% !important;
        flex: none !important;
        text-align: center;
    }
    
    #quickInfoBtn {
        width: calc(100% - 2px) !important;
        order: 2 !important;
        margin: 0 auto !important;
        background-color: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        color: #333 !important;
        backdrop-filter: blur(10px);
        padding: 8px 12px; /* Match select padding */
        font-weight: 500;
        display: block !important;
        min-height: 36px; /* Match select height */
        max-height: 36px; /* Fixed height to prevent overflow */
        border-radius: 6px;
        box-sizing: border-box;
        overflow: hidden;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 2 !important;
        pointer-events: auto !important;
    }
    
    #quickInfoBtn:hover:not(:disabled) {
        background-color: rgba(255, 255, 255, 1) !important;
        border-color: #007bff !important;
        color: #007bff !important;
    }
    
    #quickInfoBtn:disabled {
        background-color: rgba(255, 255, 255, 0.5) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
        color: rgba(105, 117, 125, 0.5) !important;
    }
    
    .btn-group .dropdown-toggle {
        width: calc(100% - 2px) !important;
        flex: none !important;
        text-align: center;
        background-color: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        color: #333 !important;
        backdrop-filter: blur(10px);
        padding: 8px 12px; /* Match other elements */
        font-weight: 500;
        display: block !important;
        min-height: 36px; /* Match other elements */
        max-height: 36px; /* Fixed height to prevent overflow */
        border-radius: 6px;
        margin: 0 auto !important;
        box-sizing: border-box;
        overflow: hidden;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 2 !important;
        pointer-events: auto !important;
    }
    
    .btn-group .dropdown-toggle:hover:not(:disabled) {
        background-color: rgba(255, 255, 255, 1) !important;
        border-color: #007bff !important;
        color: #007bff !important;
    }
    
    .btn-group .dropdown-toggle:disabled {
        background-color: rgba(255, 255, 255, 0.5) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
        color: rgba(105, 117, 125, 0.5) !important;
    }
    
    .navbar-transparent .dropdown-menu {
        background-color: rgba(0, 0, 0, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        backdrop-filter: blur(16px);
        border-radius: 8px;
    }
    
    .navbar-transparent .dropdown-item {
        color: #333 !important;
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .navbar-transparent .dropdown-item:hover {
        background-color: rgba(0, 0, 0, 0.1) !important;
        color: #333 !important;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    /* Ensure consistent styling for all mobile navigation elements */
    .navbar-transparent .navbar-collapse * {
        color: #333 !important;
    }
    
    .navbar-transparent .navbar-collapse input,
    .navbar-transparent .navbar-collapse select,
    .navbar-transparent .navbar-collapse button {
        background-color: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        color: #333 !important;
    }
    
    /* Force button visibility - Bootstrap override */
    .navbar-transparent .navbar-collapse button {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        min-height: 36px !important;
        position: relative !important;
        z-index: 3 !important;
        pointer-events: auto !important;
    }
    
    /* Specific button overrides */
    .navbar-transparent .btn-outline-light {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        background-color: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        color: #333 !important;
    }
}

/* Ensure navbar is properly responsive across all sizes */
@media (max-width: 576px) {
    .navbar-transparent .navbar-collapse {
        width: calc(100% - 16px);
        margin-left: auto;
        margin-right: auto;
    }
    
    .navbar-nav .d-flex {
        gap: 8px;
    }
    
    #countrySelect {
        font-size: 0.8rem;
        padding: 8px 10px;
    }
    
    .navbar-transparent .btn-outline-light {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* Very small mobile devices */
@media (max-width: 480px) {
    .navbar-toggler {
        top: 12px !important; /* Better visibility for smaller screens */
        padding: 6px 10px !important;
    }
    
    .leaflet-top.leaflet-left {
        margin-top: 65px !important;
    }
    
    .navbar-transparent .navbar-collapse {
        margin-top: 55px !important;
        padding: 0.75rem !important;
    }
    
    /* Fix mobile dropdown menu issues */
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
        min-width: 100%;
        max-width: 100vw;
        padding: 0.5rem 0;
        margin: 0.125rem 0 0;
        font-size: 1rem;
        color: #212529;
        text-align: left;
        list-style: none;
        background-color: #fff;
        background-clip: padding-box;
        border: 1px solid rgba(0,0,0,.15);
        border-radius: 0.375rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
        max-height: 50vh;
        overflow-y: auto;
    }
    
    /* Mobile-specific dropdown positioning */
    .dropdown-menu.mobile-positioned {
        position: fixed !important;
        top: auto !important;
        bottom: 10px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        transform: none !important;
        z-index: 9999 !important;
        border-radius: 8px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
    }
    
    .dropdown-toggle::after {
        margin-left: 0.255em;
        vertical-align: 0.255em;
        content: "";
        border-top: 0.3em solid;
        border-right: 0.3em solid transparent;
        border-bottom: 0;
        border-left: 0.3em solid transparent;
    }
    
    /* Prevent dropdown from closing on mobile when clicking inside */
    .dropdown-menu.show {
        display: block !important;
    }
    
    /* Mobile-specific dropdown button styling */
    .btn-group .dropdown-toggle {
        position: relative;
        flex-shrink: 0;
        padding: 0.375rem 0.75rem;
        font-size: 1rem;
        line-height: 1.5;
        border-radius: 0.375rem;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }
    
    /* Ensure dropdown stays open on mobile */
    @media (hover: none) and (pointer: coarse) {
        .dropdown-menu {
            pointer-events: auto;
        }
        
        .dropdown-item {
            padding: 0.75rem 1rem;
            font-size: 0.95rem;
            line-height: 1.4;
            min-height: 44px; /* iOS touch target size */
            display: flex;
            align-items: center;
            border-bottom: 1px solid rgba(0,0,0,0.05);
        }
        
        .dropdown-item:hover,
        .dropdown-item:focus {
            background-color: #f8f9fa;
            color: #16181b;
        }
        
        .dropdown-item:last-child {
            border-bottom: none;
        }
        
        /* Make dropdown items more touch-friendly */
        .dropdown-item i {
            margin-right: 0.75rem;
            width: 16px;
            text-align: center;
        }
    }
}

/* More Info Dropdown Styling */
.more-info-dropdown {
    position: absolute !important;
    top: 35px !important;
    right: 0 !important;
    background: white !important;
    border: 1px solid #ccc !important;
    border-radius: 5px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15) !important;
    padding: 5px 0 !important;
    min-width: 180px !important;
    z-index: 1004 !important;
    font-family: Arial, sans-serif !important;
    font-size: 13px !important;
    transition: opacity 0.3s ease !important;
}

.more-info-dropdown-item {
    padding: 8px 15px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    transition: background-color 0.2s ease !important;
    color: #333 !important;
    text-decoration: none !important;
}

.more-info-dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: #333 !important;
}

.more-info-dropdown-item i {
    margin-right: 8px !important;
    width: 16px !important;
    text-align: center !important;
    color: #666 !important;
    font-size: 14px !important;
    display: inline-block !important;
}

/* Animation */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hover Effects */
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.table tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
}

/* Additional responsive improvements */
@media (min-width: 769px) {
    /* Desktop navbar - ensure proper spacing and center alignment */
    .navbar-transparent .d-flex {
        gap: 1rem;
        justify-content: center !important; /* Center align controls */
        align-items: center;
    }
    
    #countrySelect {
        min-width: 180px;
        max-width: 250px;
    }
    
    /* Center align individual controls */
    .navbar-transparent .d-flex > * {
        margin: 0 auto !important;
    }
    
    /* Ensure buttons are centered */
    .navbar-transparent .btn-group {
        margin: 0 auto !important;
    }
}

@media (min-width: 992px) {
    /* Large desktop navbar */
    .navbar-transparent .d-flex {
        gap: 1.25rem;
    }
    
    #countrySelect {
        min-width: 200px;
        max-width: 280px;
    }
}

/* Add this to your styles.css file - Mobile Navigation Fix */

/* Mobile devices (768px and below) - Enhanced Layout */
@media (max-width: 768px) {
    /* Force vertical stacking in mobile */
    .navbar .container-fluid {
        position: relative;
        flex-direction: column;
        align-items: stretch; /* Changed from center to stretch */
        padding: 0;
        width: 100%;
        max-width: 100%;
    }
    
    /* Navbar collapse content - force vertical layout */
    .navbar-transparent .navbar-collapse {
        background-color: transparent; /* REMOVED WHITE BACKGROUND */
        border-radius: 0; /* REMOVED BORDER RADIUS */
        margin-top: 120px; /* INCREASED FROM 80px TO AVOID HAMBURGER OVERLAP */
        padding: 16px;
        border: none; /* REMOVED BORDER */
        box-shadow: none; /* REMOVED SHADOW */
        backdrop-filter: none; /* REMOVED BLUR */
        width: calc(100% - 32px);
        max-width: calc(100vw - 32px);
        margin-left: auto;
        margin-right: auto;
        position: relative;
        z-index: 1000;
        overflow-x: hidden;
        display: none; /* Hidden by default */
    }
    
    /* Force vertical stacking of all navigation elements */
    .navbar-nav .d-flex {
        flex-direction: column !important; /* FORCE vertical layout */
        width: 100% !important;
        gap: 12px !important; /* Space between elements */
        align-items: stretch !important; /* Full width elements */
        justify-content: flex-start !important;
        display: flex !important;
    }
    
    /* Individual element styling - reduced width for mobile */
    .navbar-nav .d-flex > * {
        width: 85% !important; /* REDUCED from 100% to 85% */
        margin: 0 auto !important; /* CENTER THE BUTTONS */
        text-align: center;
        display: block !important;
        order: unset; /* Remove any existing ordering */
    }
    
    /* Country Select - Top position */
    #countrySelect {
        width: 85% !important; /* REDUCED from 100% to 85% */
        min-width: 85% !important;
        max-width: 85% !important;
        font-size: 0.9rem;
        margin: 0 !important;
        order: 1 !important; /* First position */
        background-color: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        color: #333 !important;
        backdrop-filter: blur(10px);
        padding: 12px 16px;
        min-height: 44px; /* Touch-friendly height */
        border-radius: 6px;
        font-weight: 500;
        box-sizing: border-box;
        text-align: center !important; /* CENTER THE TEXT */
    }
    
    /* Quick Info Button - Second position */
    #quickInfoBtn {
        width: 85% !important; /* REDUCED from 100% to 85% */
        order: 2 !important; /* Second position */
        margin: 0 !important;
        background-color: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        color: #333 !important;
        backdrop-filter: blur(10px);
        padding: 12px 16px;
        font-weight: 500;
        display: block !important;
        min-height: 44px; /* Touch-friendly height */
        border-radius: 6px;
        box-sizing: border-box;
        text-align: center;
    }
    
    /* More Info Dropdown - Bottom position */
    .btn-group {
        width: 85% !important; /* REDUCED from 100% to 85% */
        display: block !important;
        order: 3 !important; /* Third position */
        margin: 0 auto !important; /* CENTER THE BUTTON GROUP */
    }
    
    .btn-group .dropdown-toggle {
        width: 85% !important; /* REDUCED from 100% to 85% */
        flex: none !important;
        background-color: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        color: #333 !important;
        backdrop-filter: blur(10px);
        padding: 12px 16px;
        font-weight: 500;
        display: block !important;
        min-height: 44px; /* Touch-friendly height */
        border-radius: 6px;
        margin: 0 !important;
        box-sizing: border-box;
        text-align: center;
    }
    
    /* Hover states for mobile elements */
    #quickInfoBtn:hover:not(:disabled),
    .btn-group .dropdown-toggle:hover:not(:disabled) {
        background-color: rgba(255, 255, 255, 1) !important;
        border-color: #007bff !important;
        color: #007bff !important;
    }
    
    /* Disabled states */
    #quickInfoBtn:disabled,
    .btn-group .dropdown-toggle:disabled {
        background-color: rgba(255, 255, 255, 0.5) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
        color: rgba(108, 117, 125, 0.5) !important;
    }
    
    /* Ensure dropdown menu is properly positioned on mobile */
    .navbar-transparent .dropdown-menu {
        background-color: rgba(255, 255, 255, 1) !important;
        border: 1px solid rgba(0, 0, 0, 0.2) !important;
        backdrop-filter: blur(16px);
        border-radius: 8px;
        width: 100%;
        position: relative;
        margin-top: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }
    
    /* Fix Bootstrap's flex behavior override */
    .d-flex.align-items-center.gap-3 {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    
    /* Remove any conflicting Bootstrap gap classes */
    .gap-3 {
        gap: 12px !important;
    }
    
    /* Ensure visibility when navbar is toggled */
    .navbar-collapse.show .d-flex {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .navbar-collapse.show .d-flex > * {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Ensure proper spacing on very small screens */
@media (max-width: 480px) {
    .navbar-nav .d-flex {
        gap: 10px !important;
    }
    
    #countrySelect,
    #quickInfoBtn,
    .btn-group .dropdown-toggle {
        padding: 10px 14px !important;
        font-size: 0.85rem !important;
        min-height: 42px !important;
    }
    
    /* Adjust navbar collapse positioning for small screens */
    .navbar-transparent .navbar-collapse {
        margin-top: 100px; /* Slightly less margin for smaller screens */
    }
}

/* Layer Control Checkbox Improvements - COLLAPSED BY DEFAULT */
.leaflet-control-layers {
    background: transparent !important;
    border: none !important;
    border-radius: 5px !important;
    z-index: 9998 !important;
    position: relative !important;
}

/* CRITICAL: Force toggle button to be visible */
.leaflet-control-layers-toggle {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* CRITICAL: Prevent auto-expansion - force collapsed state */
.leaflet-control-layers:not(.leaflet-control-layers-expanded) .leaflet-control-layers-list {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Layer control panel - HIDDEN when collapsed */
.leaflet-control-layers-list {
    display: none !important; /* Hidden by default when collapsed */
    visibility: hidden !important;
    opacity: 0 !important;
    z-index: 1000 !important;
    position: absolute !important;
    background: white !important;
    border: 2px solid rgba(0,0,0,0.2) !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    padding: 12px !important;
    min-width: 220px !important;
    max-width: 280px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    right: 0 !important;
    top: 100% !important;
    margin-top: 8px !important;
    overflow: visible !important;
    pointer-events: none !important;
}

/* Show layer control panel when expanded */
.leaflet-control-layers-expanded .leaflet-control-layers-list {
    display: block !important; /* Show when expanded */
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1000 !important;
    position: absolute !important;
    pointer-events: auto !important;
}

/* Ensure easy buttons are always visible and above layer control */
.leaflet-control-easybutton {
    z-index: 1001 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.leaflet-control-easybutton:hover {
    z-index: 1002 !important;
}

/* Responsive layer control panel */
@media (max-width: 768px) {
    .leaflet-control-layers-list {
        min-width: 200px !important;
        max-width: 250px !important;
        padding: 10px !important;
    }
}

@media (max-width: 480px) {
    .leaflet-control-layers-list {
        min-width: 180px !important;
        max-width: 220px !important;
        padding: 8px !important;
    }
}

/* Removed duplicate conflicting rules - using clean styling above */

/* Layer control toggle button - Stacked layers icon - VISIBLE AND STYLED */
.leaflet-control-layers .leaflet-control-layers-toggle {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: rgba(255,255,255,0.95) !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: 2px solid rgba(0,0,0,0.2) !important;
    width: 36px !important;
    height: 36px !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="4" rx="1"/><rect x="3" y="10" width="18" height="4" rx="1"/><rect x="3" y="17" width="18" height="4" rx="1"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 20px 20px !important;
    pointer-events: auto !important;
}

/* Desktop hover effects - only apply on devices that support hover */
@media (hover: hover) and (pointer: fine) {
    .leaflet-control-layers-toggle:hover {
        background-color: #f8f9fa !important;
        transform: scale(1.05) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
        border-color: rgba(0,0,0,0.2) !important;
    }
    
    .leaflet-control-layers-toggle:active {
        transform: scale(0.95) !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.2) !important;
    }
}

/* Force layer control toggle hover effect with higher specificity */
.leaflet-control-layers.leaflet-control .leaflet-control-layers-toggle:hover {
    background-color: #f8f9fa !important;
    transform: scale(1.05) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    border-color: rgba(0,0,0,0.2) !important;
    transition: all 0.2s ease !important;
}

.leaflet-control-layers.leaflet-control .leaflet-control-layers-toggle:active {
    transform: scale(0.95) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2) !important;
}

/* Layer control panel animations - smooth expand/collapse */
.leaflet-control-layers-list {
    transition: opacity 0.2s ease, transform 0.2s ease !important;
    transform-origin: top right !important;
    pointer-events: none !important; /* Disabled when not expanded */
    opacity: 0 !important;
    transform: translateY(-10px) scale(0.95) !important;
}

.leaflet-control-layers-expanded .leaflet-control-layers-list {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important; /* Enable when expanded */
}

/* Prevent flickering by ensuring stable hover area */
.leaflet-control-layers {
    pointer-events: auto !important;
}

/* COMPLETELY REMOVE ALL HOVER BEHAVIOR - CLICK ONLY */
/* Hover on container does nothing - click handler manages all visibility */

/* Mobile and touch device styles */
@media (max-width: 768px), (hover: none) {
    .leaflet-control-layers-toggle {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 8px !important;
    }
    
    /* Disable hover effects on touch devices */
    .leaflet-control-layers-toggle:hover {
        background-color: rgba(255,255,255,0.9) !important;
        transform: none !important;
        box-shadow: none !important;
        border-color: rgba(0,0,0,0.1) !important;
    }
    
    /* Active state for touch devices */
    .leaflet-control-layers-toggle:active {
        background-color: #f8f9fa !important;
        transform: scale(0.95) !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.2) !important;
    }
}

/* Tablet specific styles */
@media (min-width: 769px) and (max-width: 1024px) and (hover: none) {
    .leaflet-control-layers-toggle {
        min-width: 40px !important;
        min-height: 40px !important;
    }
}

.leaflet-control-layers-list {
    padding: 8px !important;
}

.leaflet-control-layers-overlays {
    max-height: 300px !important;
    overflow-y: auto !important;
}

/* Ensuring cluster markers show up */
.marker-cluster {
    color: white !important;
    font-weight: bold !important;
    font-size: 12px !important;
    text-align: center !important;
    line-height: 40px !important;
}

.marker-cluster span {
    display: block !important;
}

/* Enhanced spiderfy lines visibility and styling */
.leaflet-container .leaflet-marker-pane svg {
    z-index: 1000 !important;
    pointer-events: none !important;
}

.leaflet-container .leaflet-marker-pane svg path {
    stroke: #007bff !important;
    stroke-width: 3px !important;
    stroke-opacity: 0.8 !important;
    fill: none !important;
    z-index: 1000 !important;
    pointer-events: none !important;
}

/* Enhanced cluster marker visibility */
.marker-cluster {
    z-index: 1001 !important;
    cursor: pointer !important;
}

.marker-cluster:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Ensure spiderfy markers are visible and interactive */
.leaflet-marker-icon {
    z-index: 1002 !important;
    cursor: pointer !important;
}

.leaflet-marker-icon:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Enhanced cluster numbers visibility */
.marker-cluster div {
    color: white !important;
    font-weight: bold !important;
    font-size: 12px !important;
    text-align: center !important;
    line-height: 30px !important;
    z-index: 1003 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

.marker-cluster span {
    display: block !important;
    z-index: 1003 !important;
}

/* Enhanced cluster coverage polygons */
.leaflet-container .leaflet-marker-pane svg circle {
    fill: rgba(0, 123, 255, 0.2) !important;
    stroke: #007bff !important;
    stroke-width: 2px !important;
    stroke-opacity: 0.8 !important;
}

/* Spiderfy animation improvements */
.leaflet-marker-icon.spiderfy-marker {
    z-index: 1004 !important;
    transition: all 0.3s ease !important;
}

/* Ensure popups work properly with spiderfied markers */
.leaflet-popup {
    z-index: 1005 !important;
}

/* Mobile touch improvements for clusters */
@media (max-width: 768px) {
    .marker-cluster {
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    .marker-cluster div {
        min-width: 44px !important;
        min-height: 44px !important;
        line-height: 44px !important;
        font-size: 14px !important;
    }
}

/* User Marker Polygon Styling - REMOVED */
/* .user-marker-polygon {
    z-index: 999 !important;
}

.user-marker-polygon:hover {
    cursor: pointer;
} */

/* Enhanced User Marker Integration */
.leaflet-marker-icon.user-marker {
    z-index: 1002 !important;
    cursor: pointer !important;
}

.leaflet-marker-icon.user-marker:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* User Marker Cluster Integration */
.marker-cluster.user-marker-cluster {
    background-color: rgba(0, 123, 255, 0.8) !important;
    border: 2px solid rgba(0, 123, 255, 0.9) !important;
}

.marker-cluster.user-marker-cluster div {
    background-color: rgba(0, 123, 255, 0.9) !important;
    border: 1px solid rgba(0, 123, 255, 1) !important;
}

/* Layer Control Toggle Hover Effect - Must be at end for specificity */
.leaflet-control-layers .leaflet-control-layers-toggle:hover {
    background-color: #e9ecef !important;
    transform: scale(1.08) !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2) !important;
    border: 2px solid rgba(0,0,0,0.3) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.leaflet-control-layers .leaflet-control-layers-toggle:active {
    transform: scale(0.95) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2) !important;
}

/* Force Easy Buttons to be visible and properly ordered */
.leaflet-top.leaflet-right .leaflet-control-easybutton {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    margin-bottom: 10px !important;
    z-index: 1001 !important;
}

/* Ensure all easy buttons show up */
.leaflet-top.leaflet-right > * {
    display: block !important;
    visibility: visible !important;
}

/* Force visibility of location and home buttons */
.leaflet-control-easybutton[title="Get Current Location"],
.leaflet-control-easybutton[title="Go to Home"],
.leaflet-control-easybutton[title="More Info"],
.leaflet-control-easybutton[title="Clear All Markers"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* FORCE EASY BUTTONS TO BE VISIBLE */
.leaflet-control-easybutton {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 30px !important;
    height: 30px !important;
    background: white !important;
    border: 2px solid rgba(0,0,0,0.2) !important;
    border-radius: 4px !important;
    margin-bottom: 10px !important;
}

.leaflet-control-easybutton button {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    height: 100% !important;
}