

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: fixed; /* Keep this to stop the bounce */
}

#map {
    position: absolute; 
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%; /* Use 100% since parent is fixed */
    width: 100%;
    z-index: 1;
}

/* Move the +/- zoom buttons and the Layer toggle down */
.leaflet-top.leaflet-left, 
.leaflet-top.leaflet-right {
    margin-top: 5px !important;
}

@media (max-width: 576px) {
    .leaflet-top.leaflet-left {
        margin-top: 5px !important; /* Pushes +/- buttons below navbar */
    }
}

#selectContainer {
    position: fixed;
    top: 5px;
    z-index: 1000 !important;
    width: 250px;
    padding: 11px 0;
}


#countrySelect {
    flex: 1;
    min-width: 0; /* Critical for Safari flexbox */
    font-size: 16px !important; /* Prevents iOS auto-zoom */
    width: 200px;
    margin: 0 auto;
}


/* Adjust select width on mobile */
@media (max-width: 576px) {
    #countrySelect {
        max-width: 150px;
    }
}

.currency-btn {
    width: 45px;
    appearance: none;
    -webkit-appearance: none;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5); /* Added 0.8 for transparency */
    display: flex;
    align-items: center;
    justify-content: center;
}
    
#preloader:before {
    content: "";
    position: fixed;
    top: calc(50% - 30px);
    left: calc(50% - 30px);
    border: 6px solid #f2f2f2;
    border-top: 6px solid #56829e ;
    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);
    }
}




/* Responsive Adjustments */
/* 1. Scale up fonts for mobile readability */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Larger base font for mobile */
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    #countrySelect {
        font-size: 16px !important; /* Prevents iOS from auto-zooming on focus */
        max-width: 140px;
    }
}


/* Custom Pointer Icon Styles */
/* Container for the whole pointer */
.pin-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* The circular part containing the icon */
.pin-head {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 2;
}

/* The pointed tip part */
.pin-tip {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid; /* Color is set dynamically in JS */
    margin-top: -2px; /* Pulls tip slightly under the circle for a seamless look */
    z-index: 1;
}

/* Remove default Leaflet background */
.custom-pointer-icon {
    background: transparent !important;
    border: none !important;
}

/* Subtle hover effect */
.pin-wrapper:hover .pin-head {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}