/* @import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap'); */

* {
    font-family: 'Montserrat', sans-serif;
}

.chart-controls-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    width: 100%;
    margin: 0 auto 1rem auto;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
    font-family: 'Montserrat', sans-serif;
}

.chart-controls label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 16px;
}

.chart-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 16px;
    flex-wrap: wrap;
}

.chart-controls::before,
.chart-controls::after {
    content: unset;
}

/* Chart styling */
.chart-wrapper {
    width: 100%;
    max-height: 100%;
    height: 100%;
    position: relative;
    margin: 0 auto;
    padding: 1rem;
    padding-bottom: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
}


canvas {
    max-height: min(90vh, 400px);
    height: 400px;
}

#avgRevenueChart {
    height: 600;

}

#energyChart {
    max-height: 35%;
}


/* Reset button positioned in chart area */
.resetZoom,
.fullscreen-button,
.fullscreen-download-button,

.chart-controls select {
    position: absolute;
    bottom: .5rem;
    left: 1rem;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    z-index: 1000;
    background: linear-gradient(135deg, #00549F 0%, #003f7f 100%);
    border: none;
    color: white;
    /* font-family: 'Montserrat', sans-serif; */
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 84, 159, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: auto;
    height: auto;
}

.chart-controls select {
    position: unset;
    /* padding: 1rem; */
    /* padding-right: 24px; */
    font-size: 16px;
    /* font-weight: 500; */

    /* border-radius: 8px; */
    /* border: 2px solid #00549F; */
    /* font-family: inherit; */
    /* background: linear-gradient(135deg, #00549F 0%, #003f7f 100%); */
    /* color: white; */
    /* cursor: pointer; */
    /* transition: all 0.3s ease; */
    min-width: 180px;
    /* box-shadow: 0 2px 4px rgba(0, 84, 159, 0.2); */
    text-align: center;
}

.chart-controls select option {
    color: #00549F;
}


.fullscreen-button,
.fullscreen-download-button {
    /* position: absolute; */
    background: none;
    left: auto;
    right: 1rem;
    box-shadow: unset;
}

.fullscreen-download-button {
    /* cursor: auto; */
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 0;
    padding: 0;
    letter-spacing: 0.5px;
    font-size: 12px;
}

.fullscreen-download-button .btn-part {
    font-weight: 600;
    background: linear-gradient(135deg, #00549F 0%, #003f7f 100%);
    border: none;
    padding: 8px 16px;
    user-select: none;
    transition: all 0.3s ease;
    outline: none;
}

.resetZoom:hover,
.fullscreen-button:hover,
.chart-controls select:hover,
.chart-controls select:focus,
.fullscreen-download-button .btn-part:hover,
.dropdown-menu button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 84, 159, 0.4);
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
}

.resetZoom:active,
.fullscreen-button:active {
    transform: translateY(-1px);
}




.leaflet_style {
    border-radius: 20px;
    height: 60vh;
    max-height: 60vh;
    margin-bottom: 1.5rem;
}



.fullscreen-download-button .btn-part:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    border-right: 1px solid #00549F;

}

.fullscreen-download-button .btn-part:last-child {
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-right: 1px solid #00549F;
}


input[type="date"].calender {
    position: unset;

    font-size: 16px;
    min-width: 180px;
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #00549F;
    font-family: 'Montserrat', sans-serif;
    background: white;
    color: #00549F;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 84, 159, 0.2);
}

input[type="date"].calender:hover,
input[type="date"].calender:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 84, 159, 0.4);
    border-color: #0066cc;
    outline: none;
}

input[type="range"].slider {
    -webkit-appearance: none;
    width: 90%;
    height: 8px;
    background: linear-gradient(135deg, #00549F 0%, #003f7f 100%);
    border-radius: 10px;
    outline: none;
    transition: background 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 84, 159, 0.2);
}

/* Track (Hintergrund) */
input[type="range"].slider::-webkit-slider-runnable-track {
    height: 8px;
    background: linear-gradient(135deg, #00549F 0%, #003f7f 100%);
    border-radius: 4px;
}

input[type="range"].slider::-moz-range-track {
    height: 8px;
    background: linear-gradient(135deg, #00549F 0%, #003f7f 100%);
    border-radius: 4px;
}

/* Thumb (Schieberegler) */
input[type="range"].slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: white;
    border: 2px solid #00549F;
    box-shadow: 0 2px 6px rgba(0, 84, 159, 0.3);
    transition: all 0.3s ease;
    margin-top: -5px;
    /* Zentrieren */
}

input[type="range"].slider::-moz-range-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: white;
    border: 2px solid #00549F;
    box-shadow: 0 2px 6px rgba(0, 84, 159, 0.3);
    transition: all 0.3s ease;
}

input[type="range"].slider::-webkit-slider-thumb:hover,
input[type="range"].slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 84, 159, 0.4);
}


.dropdown-menu {
    position: absolute;
    display: flex;
    opacity: 0;
    box-sizing: border-box;
    z-index: 1000;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    /* margin: 0 auto 1rem auto; */
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
    right: -99999px;
    display: flex;
    /* Flex aktivieren */
    flex-direction: column;
    /* Vertikale Anordnung */
    align-items: stretch;
    /* Buttons gleich breit */
    padding: 0.5rem;
    /* Innenabstand, optional */
    /* gap: 0.5rem; */
    /* Abstand zwischen Buttons */
    transition: opacity 0.3s ease;
}

.dropdown-menu button {
    width: 100%;
    /* volle Breite des Dropdowns */
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 400;
    border-radius: 10px;
    cursor: pointer;
    background: linear-gradient(135deg, #00549F 0%, #003f7f 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 84, 159, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-menu button:not(:last-child) {
    margin-bottom: 0.5rem;
    /* statt gap */
}


@media (max-width: 768px) {

    .resetZoom {
        bottom: 0.5rem;
        padding: 6px 12px;
        font-size: 10px;
        width: 45%;
        height: auto;
    }


    .resetZoom {
        left: 0.5rem;
    }

    .fullscreen-download-button {
        right: 0.5rem;
        bottom: 0.5rem;
        width: 45%;
    }

    .fullscreen-download-button .btn-part {
        font-size: 10px;
        padding: 6px 12px;
        flex: 1;
    }

    .chart-controls {
        flex-direction: column;
        /* Stapelt die Controls */
        align-items: stretch;
        /* Nimmt volle Breite ein */
        width: 100%;
        /* Container volle Breite */
        gap: 1rem;
        font-size: 14px;

    }

    .chart-controls label {
        font-size: 14px;
        /* Kleinere Schriftgröße */
        text-align: center;
        /* Zentriert den Text */
    }

    .chart-controls select {
        min-width: unset;
        /* Entfernt die Desktop-Mindestbreite */
        width: 100%;
        /* Füllt den Container aus */
        font-size: 14px;
        /* padding: 10px 12px; */
    }
}


.loader {
    border: 6px solid rgba(255, 255, 255, 0.2);
    /* Hintergrund-Kreis */
    border-top: 6px solid rgba(0, 84, 159);
    /* animierter Teil */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    position: absolute;
    /* Optional: mittig platzieren */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
    /* Standard: versteckt */
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
