input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

input[type=number] {
    appearance: none;
}

.map {
    position: relative;
}

.config {
    cursor: pointer;
    border: none;
    padding-bottom: 2px;
    /* height: 15px;
          width: 15px; */
    /* border: 2px solid #9fa2a4; */
    height: 15px;

    border-radius: 5px;
    /* background: linear-gradient(#fbfbfb, #d1d1d1);  */
    /* background: url("{% static 'images/settings.png'%}") no-repeat; */
}

.dots {
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    /* The Arial font appears to have "square" dots */
    font-size: 24px;
    /* The size of the dots */
    line-height: 0;
    letter-spacing: -2px;
    display: inline;
    margin-left: auto;
    margin-right: auto
}

.dropdown dd ul li {
    height: 30px;
}


#disclaimer_output {
    font-family: arial;
    font-size: 10px;
    /* font-weight: bold;*/
    text-align: left;
    color: #000;
    background-color: white;
}

#container {
    width: 100%;
    height: 680px;
}

.container-grow {
    height: 75vh !important;
    min-height: 680px;
}

#second {
    width: 100%;
    float: left;
    height: 100%;
    background-color: white;
}

.dropbtn {
    background-color: #093f61;
    color: white;
    padding: 16px;
    font-size: 16px;
    border: solid white;
    width: 350px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    width: 350px;
    padding-left: 5px;
    display: none;
    position: absolute;
    background-color: #f1f1f1;
    /* min-width: 160px; */
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

#depth-container,
#graph-container {
    position: relative;
}

.download-dropdown {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 2000;
}

.download-btn {
    padding: 5px 10px;
    font-size: 13px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}


.download-options {
    display: none;
    position: absolute;
    top: 30px;
    right: 0;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    min-width: 200px;
}

.download-options a {
    display: block;
    padding: 8px 15px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.download-options a:hover {
    background-color: #f0f0f0;
}

.download-section-title {
    font-weight: bold;
    padding: 8px 15px 4px 15px;
    font-size: 12px;
    color: #666;
    border-bottom: 1px solid #eee;
    margin-bottom: 4px;
}

.download-section {
    margin-bottom: 8px;
}

.dropdown-content a {
    color: black;
    /* padding: 12px 16px; */
    text-decoration: none;
    display: block;
}

#depth-container {
    pointer-events: auto;
}

.dropdown-content a:hover {
    background-color: #ddd;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    background-color: #3e8e41;
}

.leaflet-top.leaflet-right {
    z-index: 998;
}

.blinking-marker {
    position: relative;
    width: 14px;
    height: 14px;
}

.blinking-marker .center-dot {
    width: 6px;
    height: 6px;
    background-color: red;
    border-radius: 50%;
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 2;
}

.blinking-marker .blinking-circle {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 0, 0, 0.5);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    animation: blink 1s infinite;
    z-index: 1;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.2;
    }
}


.leaflet-control-layers.leaflet-control {
    background-color: #ffffff;
    inline-size: 95%;
    text-overflow: ellipsis;
    overflow-x: scroll;
    overflow-y: scroll;
    white-space: nowrap;
    font-size: 10px;
    /* overflow: hidden; */
}

.leaflet-control-layers-group-name {
    font-weight: 700;
    margin-bottom: .2em;
    margin-left: 3px
}

.leaflet-control-layers-group {
    margin-bottom: .5em
}

.leaflet-control-layers-scrollbar {
    overflow-y: scroll;
    padding-right: 10px
}

.dropdown dd,
.dropdown dt,
.dropdown ul {
    margin: 0px;
    padding: 0px;
}

.dropdown dd {
    position: relative;
}

.dropdown a,
.dropdown a:visited {
    color: #ddd;
    text-decoration: none;
    outline: none;
}

.dropdown a:hover {
    color: #ddd;
}

.dropdown dt a:hover {
    color: #ddd;
    border: 1px solid #ddd;
}

.dropdown dt a {
    background: #ddd url('http://ntltest.gcoos.org/images/handler/colormaps/arrow1.png') no-repeat scroll right center;
    background-position: center right 5px;
    display: block;
    padding-right: 12px;
    border: 1px solid #ddd;
    width: 100%;
}

.dropdown dt a span {
    cursor: pointer;
    color: black
}

.dropdown dd ul {
    background: #ddd none repeat scroll 0 0;
    border: 1px solid #d4ca9a;
    color: #ddd;
    display: none;
    left: 0px;
    padding: 5px 0px;
    position: absolute;
    top: 2px;
    width: auto;
    min-width: 170px;
    list-style: none;
}

.dropdown span.value {
    display: none;
}

.dropdown dd ul li a {
    display: block;
}

.dropdown dd ul li a:hover {
    background-color: #ddd;
}

.dropdown img.flag {
    border: none;
    vertical-align: middle;
    margin-left: 3px;
}

.dropdown img.flag1 {
    display: block;
    width: 95%;
    padding-top: 6px;
    height: 20px;
    margin: 0 auto;
    border: none;
    /*clip-path: inset(0px 0px 7px 0px); /* top, right, bottom, left */
}

#graph-container {
    width: 620px;
    height: 330px;
    padding: 15px;
    padding-top: 15px;
    background-color: white;
    box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.2);
    position: absolute;
    /* NOT fixed */
    bottom: 0px;
    right: 0px;
    z-index: 1000;
    display: none;

    overflow: hidden;
}

#graph-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    display: none;
}

/* Layer Loading Overlay */
#layer-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease-out;
}

#layer-loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.loading-subtext {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    max-width: 300px;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Error Alert Styles */
.error-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 2px solid #e74c3c;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    max-width: 500px;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.error-icon {
    font-size: 48px;
    color: #e74c3c;
    margin-bottom: 15px;
}

.error-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.error-message {
    font-size: 16px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 25px;
}

.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.error-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.error-btn-primary {
    background: #3498db;
    color: white;
}

.error-btn-primary:hover {
    background: #2980b9;
}

.error-btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.error-btn-secondary:hover {
    background: #bdc3c7;
}

.error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2999;
    backdrop-filter: blur(2px);
}

.depth-chart-container {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    /* Pushes .chart-wrapper to right */
}


#depthChart {
    width: 100% !important;
    max-width: 600px;
    height: 310px !important;
    padding-top: 20px;
}

#container {
    width: 100%;
    margin-bottom: 40px;
}

#custom-layer-control {
    width: 280px !important;
    /* Fixed width with !important */
    max-width: 280px !important;
    /* Prevent expansion */
    min-width: 280px !important;
    /* Prevent shrinking */
    height: 500px !important;
    /* Fixed height */
    max-height: 500px !important;
    /* Prevent expansion */
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.13);
    border: 1px solid #e4e7ec;
    overflow-x: hidden;
    overflow-y: auto;
    /* Enable vertical scrolling */
    position: absolute;
    right: 200px;
    /* was 18px */
    top: 15px;
    /* was 20px */
    z-index: 998;
    font-family: 'Inter', Arial, sans-serif;
    transition: box-shadow 0.2s;
}

#custom-layer-control:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.17);
}

/* Show scrollbar */
#custom-layer-control::-webkit-scrollbar {
    width: 8px;
}

#custom-layer-control::-webkit-scrollbar-track {
    background: #f1f1f1;
    /*border-radius: 4px;*/
    border-radius: 10px;
}

#custom-layer-control::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    /*border-radius: 4px;*/
    border-radius: 10px;
}

#custom-layer-control::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

#custom-layer-control {
    -ms-overflow-style: scrollbar;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}


#custom-layer-control.minimized {
    /* Firefox */
    scrollbar-width: none;

    /* IE/legacy Edge */
    -ms-overflow-style: none;
}

/* Chrome, Edge (Chromium), Safari */
#custom-layer-control.minimized::-webkit-scrollbar {
    display: none;
}

.custom-layer-header {
    background: linear-gradient(90deg, #4361ee 0%, #4cc9f0 100%);
    padding: 5px 10px 5px 13px;
    /* reduced all paddings */
    color: #fff;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    /* was 17px */
    /*border-radius: 10px 10px 10px 10px;*/
    border-radius: 10px 10px 10px 10px;
    cursor: move;
    /* if you want draggable from header */
    user-select: none;
    min-height: 32px;
    /* sets compact header height */
}

.custom-layer-title {
    letter-spacing: 0.3px;
    /* less letter spacing */
    margin-right: 6px;
    /* space before minimize */
}

.custom-layer-minimize {
    background: rgba(255, 255, 255, 0.23);
    color: #222;
    border: none;
    border-radius: 50%;
    width: 22px;
    /* was 28px */
    height: 22px;
    /* was 28px */
    cursor: pointer;
    outline: none;
    font-size: 16px;
    /* was 20px */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    box-shadow: 0 2px 8px rgba(68, 124, 244, 0.08);
    margin-left: 2px;
    /* compact left space */
}

.custom-layer-minimize:hover {
    background: #fff;
    color: #4361ee;
}

#custom-layer-content {
    padding: 4px 6px 6px 5px;
    /* less padding on all sides */
    background: #fafbfc;
    transition: max-height 0.2s;
}


#custom-layer-control label,
#custom-layer-control strong {
    font-weight: bold;
    margin: 3px 0 0 5px;
    /* Almost no margin */
    font-size: 10px !important;
}

#custom-layer-control form label {
    display: flex;
    align-items: center;
    margin: 0 0 0 6px;
    /* Remove top margin, small left indent */
    font-size: 10px !important;
    cursor: pointer;
    min-height: 18px;
    /* Just enough for radio/check + label */
    line-height: 1.2;
}

#custom-layer-control .leaflet-control-layers-separator {
    height: 1px;
    background: #ddd;
    margin: 2px 0;
}

#custom-layer-control input[type=radio],
#custom-layer-control input[type=checkbox] {
    margin-right: 4px;
}

#custom-layer-control .config {
    margin-left: auto;
    background: #eee;
    border: none;
    padding: 0 4px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
}


#custom-layer-control.minimized {
    height: 45px !important;
    /* Override fixed height when minimized */
    min-height: 45px !important;
    max-height: 45px !important;
    /* adjust to your header height */
    overflow: hidden;
    transition: height 0.2s;
}

#custom-layer-control.minimized #custom-layer-content {
    display: none;
}

#map-slider {
    position: absolute;
    bottom: 1rem;
    /* positioned at bottom */
    left: 50%;
    /* centered horizontally */
    transform: translateX(-50%);
    /* center the slider */
    width: 60%;
    /* reasonable width */
    max-width: 600px;
    /* increased max-width */
    z-index: 995;
    background-color: transparent;
    display: none;
    /* Hidden by default */
}

#slider-toggleMH {
    position: absolute;
    top: 1rem;
    right: 50px;
    /* positioned to the right */
    width: 130px;
    /* increased width */
    height: 30px;
    /* auto height for single line */
    z-index: 998;
    background-color: white;
    color: black;
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: none;
    /* Hidden by default, shown when layer is selected */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    /* prevent text wrapping */
    text-align: center;
    /* center text */
}

#slider-toggleMH:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

/* Responsive adjustments for different screen sizes */
@media (max-width: 768px) {
    #map-slider {
        width: 70%;
        max-width: none;
        min-width: 250px;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
    }

    #slider-toggleMH {
        top: 1rem;
        right: 50px;
        width: 130px;
        height: 30px;
        font-size: 11px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    #map-slider {
        width: 75%;
        min-width: 200px;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
    }

    #slider-toggleMH {
        top: 1rem;
        right: 50px;
        width: 130px;
        height: 30px;
        font-size: 10px;
        padding: 5px 8px;
    }
}

@media (min-width: 1200px) {
    #map-slider {
        width: 50%;
        max-width: 600px;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
    }

    #slider-toggleMH {
        top: 1rem;
        right: 50px;
        width: 130px;
        height: 30px;
    }
}

.tooltip {
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #333;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    white-space: nowrap;
}

.tooltip.offset {
    top: -3rem;
}

.flagvisibility {
    display: none;
}

#rivers-legend {
    transform: rotate(90deg);
    height: 300px;
    width: 300px;
    object-fit: scale-down;
    object-position: 0%;
}

.clear-layer {
    border: 1px solid #008CBA;
    color: #008CBA;
    font-weight: bold;
    height: auto;
    width: fit-content;
    padding: 1px;
}

.clear-layer:hover {
    color: white;
    background-color: #008CBA;
}

.slidecontainer {
    width: 100%;
}

/* .slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
}

.slider:hover {
    opacity: 1;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgb(5, 128, 228);
    background-color: rgb(5, 128, 228);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgb(5, 128, 228);
    background-color: rgb(5, 128, 228);
    cursor: pointer;
} */


section.range-slider {
    position: relative;
    width: 100%;
    height: 35px;
    text-align: center;

}

section.range-slider input {
    pointer-events: none;
    position: absolute;
    overflow: hidden;
    left: 0;
    top: 15px;
    width: 100%;
    outline: none;
    height: 18px;
    margin: 0;
    padding: 0;

}

section.range-slider input::-webkit-slider-thumb {
    pointer-events: all;
    position: relative;
    z-index: 1;
    outline: 0;
}

section.range-slider input::-moz-range-thumb {
    pointer-events: all;
    position: relative;
    z-index: 10;
    -moz-appearance: none;
    width: 9px;
}

section.range-slider input::-moz-range-track {
    position: relative;
    z-index: -1;
    background-color: rgba(0, 0, 0, 1);
    border: 0;
}

section.range-slider input:last-of-type::-moz-range-track {
    -moz-appearance: none;
    background: none transparent;
    border: 0;
}

section.range-slider input[type=range]::-moz-focus-outer {
    border: 0;
}

.leaflet-control-layers-toggle.leaflet-layerstree-named-toggle {
    margin: 2px 5px;
    width: auto;
    height: auto;
    background-image: none;
}

.leaflet-control-layers {
    border: solid 1px;
    background-color: aquamarine;
}

.leaflet-layerstree-node {}

.leaflet-layerstree-header input {
    margin-left: 0px;
}


.leaflet-layerstree-header {}

.leaflet-layerstree-header-pointer {
    cursor: pointer;
}

.leaflet-layerstree-header label {
    display: inline-block;
    cursor: pointer;
}

.leaflet-layerstree-header-label {}

.leaflet-layerstree-header-name {}

.leaflet-layerstree-header-space {}

.leaflet-layerstree-children {
    padding-left: 10px;
}

.leaflet-layerstree-children-nopad {
    padding-left: 0px;
}

.leaflet-layerstree-closed {}

.leaflet-layerstree-opened {}

.leaflet-layerstree-hide {
    display: none;
}

.leaflet-layerstree-nevershow {
    display: none;
}

.leaflet-layerstree-expand-collapse {
    cursor: pointer;
}