<style>

body{
    margin: 0;
    padding: 0;
}

/*to remove default browser styles*/
* {
    margin: 0;
    padding: 0;
    font-family: "DM Sans", sans-serif;
    font-weight: 400;
}

h1 {
    font-size: 20px;
    font-weight: 600;
    color: #e5e5e5;
}

h2 {
    font-size: 18px;
    font-weight: 450;
    color: #aaaaaa
;
}

h3 {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    color: #e5e5e5;
}

h4 {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    color: #e5e5e5;
}

p {
    font-size: 12px;
    margin: 0;
    color: #e5e5e5;
}

a {
    color: #00df81;
}

small {
    font-size: 12px;
    line-height: 1.1;
}

.navbar-background {
    position: fixed;
    top: 0;
    height: 45px;
    background-color: #171717;
    z-index: 9;
    width: 100%;
    left: 0;
    opacity: 0.8;
}

.navbar {
    position: fixed;
    top: 0;
    height: 45px;
    /*background-color: #171717;*/
    z-index: 999;
    width: 100%;
    left: 0;
    opacity: 1;
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.nav-content {
    margin: 0 15px 0 15px;
}

.nav-content h1{
    margin: 0; /*to cancel the automatic margin from h1*/
}

#nav-content-h1{
    text-decoration: none;
    font-size: 24px;
    font-weight: 600;
    color: #e5e5e5;
}

.nav-content a {
    text-decoration: none;
    color: #d4d4d4;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 400;
}

.nav-content a.active {
    text-decoration:underline;
    text-underline-offset: 5px;
    font-weight: 400;
    color: #00df81;
}

.nav-content a:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
    font-weight: 400;
}

/*Mute effect*/
.muted-overlay{
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0.8;
    z-index: 50;
    cursor: pointer;
}

/*Styling popup content*/
.popup-content {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 66%;
    max-width: 900px;
    height: 60%;
    max-height: 800px;
    background-color: #262626;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 99;
    text-align: left;
}

.popup-content h2{
    margin-top: 0;
    font-size: 28px;
    font-weight: 400;
}

.popup-content p{
    font-size: 16px;
}

.popup-content .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #aaaaaa;
}

.popup-columns{
    /*column-count: 2; set the number of column*/
    /*column-gap: 50px;*/
    position: relative;
    text-align: justify;
    overflow-y: auto;
    margin-top: 10px;
    padding-right: 10px; /*for scrollbar*/
    height: calc(95% - 65px - 20px); /*65px is footer height, 15px is gap*/

    /* Scrollbar styling */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #aaaaaa #262626; /* Firefox */
}

/* Webkit scrollbar styling (Chrome, Safari, Edge) */
.popup-columns::-webkit-scrollbar {
    width: 6px;
}

.popup-columns::-webkit-scrollbar-button {
    display: none;
}

.popup-columns::-webkit-scrollbar-track {
    background: #262626;
    border-radius: 2px;
}

.popup-columns::-webkit-scrollbar-thumb {
    background: #aaaaaa;
    border-radius: 2px;
}

.popup-columns::-webkit-scrollbar-thumb:hover {
    background: #888888;
}

.popup-column-content{
    margin-bottom: 0px;
}
.popup-footer{
    display: flex; 
    justify-content: space-between; /*ensures logo stay on the left and mentu stays on the right*/
    align-items: center;
    background-color: #aaaaaa;
    position: fixed; /*make navbar stays on top when scrolling*/
    bottom: 0;
    height:65px;
    right: 0px;
    width: 100%;
    z-index: 99; /*ensure above other element (like arrange or order)*/
}

.popup-footer .logo {
    margin-left: 30px;
    margin-right: 30px;
}

.popup-footer .logo img{
    height: 40px;
    width: auto;
    bottom: 5px;
}

.spacer {
    height: 18px; /*to give space between popup paragraf*/;
}

/*position of the map on the page*/
#map {
    position: absolute;
    top: 0px;
    left: 0;
    bottom: 0px;
    right: 0%; /* Default percentage for large screens */
}

.map-overlay-background {
    position: absolute;
    top: 45px; /* Below the navbar */
    bottom: 100px; /* Above the footer */
    right: 0;
    background: #171717;
    opacity: 0.8; /* Semi-transparent */
    z-index: 1; /* Below the sidebar and footer */
    width: 20%; /* Default percentage for large screens */
}

.map-overlay {
    position: absolute;
    top: 45px;
    bottom: 100px;
    right: 0;
    /* background: #171717; */  
    margin-right: 0px;
    overflow: auto;
    opacity: 1.0;
    border-radius: 0px;
    z-index: 10; /*ensure above the map*/
    width: 20%; /* Default percentage for large screens */
}

.map-overlay-content {
    margin-top: 5px;
    margin-left: 10px;
    padding-right: 15px;
}

/* Webkit scrollbar styling (Chrome, Safari, Edge) */
.map-overlay::-webkit-scrollbar {
    width: 6px;
}

.popup-columns::-webkit-scrollbar-button {
    display: none;
}

.map-overlay::-webkit-scrollbar-track {
    background: #262626;
    border-radius: 2px;
}

.map-overlay::-webkit-scrollbar-thumb {
    background: #aaaaaa;
    border-radius: 2px;
}

.map-overlay::-webkit-scrollbar-thumb:hover {
    background: #888888;
}

.footer {
    display: flex;
    justify-content: space-between; /*ensures logo stay on the left and mentu stays on the right*/
    align-items: center;
    background-color: #aaaaaa;
    padding: 0 0px;
    position: fixed; /*make footer stay at the bottom even when it scrolled*/
    bottom: 0;
    height:100px;
    right: 0px;
    width: 20%;
    z-index: 40; /*ensure above other element (like arrange or order)*/
}

.logo{
    display: flex;
    align-items: center;
    margin-left: 5px;
    margin-right: 5px;
    bottom: 5px;
}

.footer .logo img {
    height: 50px;
    width: auto;
    bottom: 5px;
}

.theme-change {
    display: flex;
    align-items: centre;
    flex-direction: column; /*to kae the small ext above toggle, otherwise it will be side by side*/
    margin-left: 10px;
}

.theme-change small{
    text-align: left;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 33px;
    height: 20px;
    margin-top: 8px;
}

.theme-switch input {
    /*to hide the default html checkbox*/
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; /*positioning the toggle slider*/
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #525252;
    -webkit-transition: 0.4s;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    /*to set the initial condition*/
    position: absolute;
    content: "";
    height: 14px; /*size of the slider button*/
    width: 14px;
    left: 2px; /*positioning the slider button*/
    bottom: 3px; /*positioning the slider button*/
    background-color: #d4d4d4;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #fafafa;
    
}

input:checked + .toggle-slider:before {
    transform: translateX(14px);
    background-color: #d4d4d4;
}

.region-select {
    font-size: 16px;
    height: 28px;
    width: 100%;
    border-width: 1px;
    font-family: inherit;
    border-radius: 4px;
    background-color: #ffffff;
    border-color: #dfdddd;
}

.slider-number{
    display: flex;
    justify-content: space-between;
}

#slider {
    margin-top: 16px;
}

#slider h2{
    font-size: 18px;
}

#adh-rate-slider {
    -webkit-appearance: none;
    width: 100%;
    opacity: 0.8;
    border-radius: 10px;
    outline: none;
    height: 15px;
}

#adh-rate-slider:hover{
    opacity: 1;
    cursor: pointer;
}

#adh-rate-slider::-webkit-slider-runnable-track{
    background: linear-gradient(to right, #9ECAE1, #7BB4D7, #6FADD3, #65A7D0, #5BA1CD, #4D99C9, #4292C6, #2171B5, #0F407D);
    border-radius: 10px;
    border: none;
    height: 15px;
}

#adh-rate-slider::-webkit-slider-thumb{
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background:none;
    border-radius: 50%;
    border: 4px solid #fff;
    cursor: pointer;
    margin-top: -3px;
}

.info {
    margin-top: 25px; /*giving space with previous section*/
}

.info-data {
    margin-top: 8px;
}

.info-row{
    display: flex; /*to make the container into a flex container*/
    justify-content: space-between; /*to distribute the container content equally*/
    align-items: center;  /*align vertically in the center*/
    margin-bottom: 5px; /*giving space between line*/
}

.info-label {
    flex: 2;
    text-align: left;
}

.info-value {
    flex: 2;
    text-align: right;
}

.info-unit {
    flex: 1;
    text-align: right;
}

:root {
    --graph-bar-color: steelblue;
    --graph-text-color: #fff;
    --graph-stroke-color: #fff;
}

.graph-bar {
    fill: var(--graph-bar-color)
}

.graph-text {
    fill: var(--graph-text-color)
}

.graph-stroke {
    fill: var(--graph-text-color)
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #171717;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #aaaaaa;
    border-top: 5px solid #00df81;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-overlay p {
    color: #e5e5e5;
    font-size: 16px;
}

/* Make the graph container responsive */
#graph-container {
    width: 100%;
    overflow: hidden;
}

#graph {
    width: 100%;
    min-height: 175px;
}


.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #aaaaaa;
    padding: 0 0px;
    position: fixed;
    bottom: 0;
    height: 100px;
    right: 0px;
    width: 20%; /* Default percentage for large screens */
    z-index: 40;
}

/* Tablet and larger - fixed 300px sidebar */
@media screen and (max-width: 1024px) and (min-width: 769px) {
    .map-overlay {
        width: 300px;
    }

    .map-overlay-background {
        width: 300px; /* Match the overlay width */
    }

    #map {
        right: 0px;
    }
    
    .footer {
        width: 300px;
    }
}

/* Small tablets - slightly smaller sidebar */
@media screen and (max-width: 768px) and (min-width: 481px) {
    .map-overlay {
        width: 280px;
    }

    .map-overlay-background {
        width: 280px; /* Match the overlay width */
    }
    
    #map {
        right: 0px;
    }
    
    .footer {
        width: 280px;
    }
}

/* Phones - much smaller sidebar to preserve map space */
@media screen and (max-width: 480px) {
    .map-overlay {
        width: 220px; /* Smaller for phones */
        font-size: 0.9em; /* Slightly smaller text */
    }

    .map-overlay-background {
        width: 220px; /* Match the overlay width */
    }
    
    #map {
        right: 0px;
    }
    
    .footer {
        width: 220px;
    }
    
    /* Adjust content for smaller sidebar */
    .map-overlay-content h1 {
        font-size: 1em;
    }
    
    .map-overlay-content h2 {
        font-size: 0.9em;
    }
    
    #graph {
        min-height: 100px; /* Shorter graph for phones */
    }
}

