/* General Container */
.map-container-wrapper {
    position: relative;
    height: 700px;
    overflow: hidden;
    border-radius: .25rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    z-index: 1;
    transition: all 0.3s ease-in-out;
}

/* Fullscreen Mode */
.map-container-wrapper.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    z-index: 999999;
}

#map {
    height: 100%;
    width: 100%;
}

/* --- Controls and Sidebar --- */
#sidebar {
    position: absolute;
    top: 70px;
    left: 60px;
    width: 190px;
    background: rgba(33, 37, 41, 0.92);
    color: #ced4da;
    transition: transform 0.35s ease-in-out;
    transform: translateX(0);
    z-index: 1001;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

#sidebar.collapsed {
    transform: translateX(calc(-100% - 70px));
}

.sidebar-header {
    padding: 10px 15px;
    border-bottom: 1px solid #495057;
}

.sidebar-header h5 {
    margin: 0;
    font-size: 1.1rem;
}

.sidebar-content {
    padding: 5px;
    flex-grow: 1;
}

#map-controls-cluster {
    position: absolute;
    top: 70px;
    left: 10px;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-flex {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group-flex .ts-wrapper {
    flex-grow: 1;
}

#weather-controls {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #495057;
}

/* Modal Fix */
.modal {
    z-index: 1000000 !important;
}

/* --- RESTORED: Full Legend Styles --- */
.legend {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-family: sans-serif;
    font-size: 12px;
    max-width: 320px;
    line-height: 1.5em;
}

.legend h4 {
    margin: 0 0 6px;
    font-size: 10px;
}

.legend-section {
    margin-bottom: 6px;
}

.legend-bar {
    height: 5px;
    border-radius: 5px;
    margin: 4px 0;
    width: 200px;
    max-width: 100%;
}

.legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    width: 200px;
    max-width: 100%;
    margin: 0 auto;
}

.legend-labels span {
    flex: 1;
    text-align: center;
    padding: 0 4px;
}

.clouds-bar {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.0) 0%, rgba(252, 251, 255, 0.2) 20%, rgba(246, 245, 255, 0.75) 60%, rgba(240, 240, 255, 1) 100%);
}

.rain-bar {
    background: linear-gradient(to right, rgba(225, 200, 100, 0) 0%, rgba(110, 110, 205, 0.3) 50%, rgba(80, 80, 225, 0.7) 75%, rgba(20, 20, 255, 0.9) 100%);
}

.temp-bar {
    background: linear-gradient(to right, rgba(130, 22, 146, 1) 0%, rgba(32, 140, 236, 1) 25%, rgba(35, 221, 221, 1) 50%, rgba(255, 240, 40, 1) 75%, rgba(252, 128, 20, 1) 100%);
}

.pressure-bar {
    background: linear-gradient(to right, rgba(0, 115, 255, 1) 0%, rgba(176, 247, 32, 1) 50%, rgba(198, 0, 0, 1) 100%);
}

.wind-bar {
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(179, 100, 188, 0.7) 50%, rgba(70, 0, 175, 1) 80%, rgba(13, 17, 38, 1) 100%);
}

#weatherDataTable {
    color: #212529;
}

/* --- Weather Icon Radio Control --- */
.weather-icon-control {
    margin-bottom: 4px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 5px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: row;
    margin-bottom: 10px;
    /* Space above the legend toggle */
}

.weather-icon-control input[type="radio"] {
    display: none;
    /* Hide the actual radio button */
}

.weather-icon-control label {
    cursor: pointer;
    padding: 8px 10px;
    margin: 0;
    transition: background-color 0.2s;
    font-size: 14px;
    color: #333;
}

.weather-icon-control label:hover {
    background-color: #f4f4f4;
}

.weather-icon-control input[type="radio"]:checked+label {
    background-color: #007bff;
    color: white;
}

.weather-icon-control label:first-of-type {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.weather-icon-control label:last-of-type {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}


