html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#map {
    height: 100vh; /* Fullscreen height */
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* ====== LOADING SCREEN ====== */
#loadingDiv {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    z-index: 1100;
    display: none;
}

/* ====== COUNTRY DROPDOWN ====== */
#selectContainer {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000; 
    background: rgba(255, 255, 255, 0.9);
    padding: 5px;
    border-radius: 5px;
}

#countrySelect {
    width: 200px;
    opacity: 1; 
    display: block; 
    pointer-events: auto;
}

/* Ensure Font Awesome icons in the modal are visible */
#countryInfoModal .fa-solid {
    display: inline-block;
    width: 1.5em;
    text-align: center;
}

/* ✅ Force the Layer Control Button to be larger */
.leaflet-control-layers {
    font-size: 18px; /* Increase font size */
}





/* ====== WEATHER MODAL STYLES ====== */
#weatherModalBody {
    overflow: hidden;
    height: auto;
}

#weatherModal .modal-content {
    border-radius: 10px;
}

#weatherModal .modal-header {
    border-bottom: none;
    background: #007bff; /* Matches Bootstrap primary */
}

#weatherModal .modal-footer {
    border-top: none;
    text-align: center;
    font-size: 0.9rem;
}

#weatherModal img {
    max-width: 50px;
}

/* Preloader for Weather Modal */
#weatherPreload {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    overflow: hidden;
    background: #fff;
}

#weatherPreload:before {
    content: "";
    position: fixed;
    top: calc(50% - 30px);
    left: calc(50% - 30px);
    border: 6px solid #f2f2f2;
    border-top: 6px solid #007bff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    -webkit-animation: weather-loader 1s linear infinite;
    animation: weather-loader 1s linear infinite;
}

@-webkit-keyframes weather-loader {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes weather-loader {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

.weatherFadeOut {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 1s, opacity 1s linear;
}

/* Ensure proper spacing inside Weather Modal */
#weatherModal .row {
    margin: 5px 0;
}

#weatherModal .col {
    padding: 5px;
}


/* ====== MODAL PRELOADER country info ====== */
#pre-load {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    overflow: hidden;
    background: #fff;
}

#pre-load:before {
    content: "";
    position: fixed;
    top: calc(50% - 30px);
    left: calc(50% - 30px);
    border: 6px solid #f2f2f2;
    border-top: 6px solid #2D8E5D;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    -webkit-animation: animate-preloader 1s linear infinite;
    animation: animate-preloader 1s linear infinite;
}

@-webkit-keyframes animate-preloader {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes animate-preloader {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

.fadeOut {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 1s, opacity 1s linear;
}

/* 📰 News Modal Styling */
#newsModal img {
    max-width: 100px;
    border-radius: 5px;
}


/* ====== Marker Clusters STYLES ====== */
.fa-wikipedia-w,
.fa-virus,
.fa-info,
.fa-pound-sign,
.fa-cloud,
.fa-compass,
.fa-location-arrow {
    line-height: 3rem;
}
.fa-info,
.fa-pound-sign,
.fa-cloud,
.fa-compass,
.fa-location-arrow {
    font-size: 1.5rem;
}
.fa-wikipedia-w,
.fa-virus {
    font-size: 1.5rem;
}

/* 🔴 Earthquake Clusters */
.marker-cluster-earthquake {
    background-color: rgba(255, 87, 87, 0.6);
    display: block;
}
.marker-cluster-earthquake div {
    background-color: rgba(245, 0, 0, 0.8);
    color: white;
}

/* 🟡 City Clusters */
.city-cluster-small {
    background-color: rgba(255, 215, 0, 0.6);
}
.city-cluster-small div {
    background-color: rgba(218, 165, 32, 0.8);
}

.city-cluster-medium {
    background-color: rgba(255, 165, 0, 0.6);
}
.city-cluster-medium div {
    background-color: rgba(255, 140, 0, 0.8);
}

/* 🟢 Hotel Clusters */
.hotel-cluster-small {
    background-color: rgba(50, 205, 50, 0.6);
}
.hotel-cluster-small div {
    background-color: rgba(34, 139, 34, 0.8);
}

/* 🔵 Fuel Stations Clusters */
.marker-cluster-fuel {
    background-color: rgba(0, 191, 255, 0.6);
    display: block;
}
.marker-cluster-fuel div {
    background-color: rgba(30, 144, 255, 0.8);
    color: white;
}



/* ====== MOBILE (0px+) ====== */
@media screen and (max-width: 767px) {
    .leaflet-control-layers-toggle {
        width: 30px;
        height: 30px;
    }
    .leaflet-control-layers-toggle {
        width: 30px;
        height: 30px;
        background-size: contain !important;
    }
}

/* ====== TABLET (768px+) ====== */
@media screen and (min-width: 768px) {
    .leaflet-top.leaflet-left {
        left: 15px;
    }

    .leaflet-control-layers-toggle {
        width: 35px;
        height: 35px;
    }
    .leaflet-control-layers-toggle {
        width: 50px;
        height: 50px;
        background-size: 60% !important;
    }
}

/* ====== DESKTOP (1024px+) ====== */
@media screen and (min-width: 1024px) {
    .leaflet-top.leaflet-left {
        left: 20px;
    }
    
    .leaflet-control-layers-toggle {
        width: 40px;
        height: 40px;
    }
    .leaflet-control-layers-toggle {
        width: 70px !important;
        height: 70px !important;
        background-size: 60% !important; /* Ensures the icon scales properly */
        background-position: center !important;
    }
}