body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-size: 14px;
    font-family: "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

p {
    margin-bottom: 1em;
}

label {
    cursor: pointer;
    display: block;
    margin-bottom: 5px;
}

ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

ul li {
    margin-bottom: 8px;
}

.dark-text, .dark-text i, .dark-text span {
    color: #000;
}

.leaflet-container {
    font-size: 0.9em;
}

.leaflet-pane > svg path.leaflet-interactive:focus {
    outline: none;
}

.hidden,
.mobile-only {
    display: none;
}

#map {
    height: 100vh;
    width: 100vw;
}

#controls {
    position: absolute;
    top: 1%;
    left: 50px;
    background: #023664;
    color: #ccc;
    padding: 15px;
    z-index: 1000;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    max-width: 360px;
    width: 360px;
    overflow-y: auto;
    height: 95vh;
}

#sensor-filters {
    padding-bottom: 40px;
}

/* Language Switcher */
.lang-switcher-wrapper {
    position: relative;
    display: inline-grid;
    grid-template-columns: 80px 80px;
    gap: 20px;
    align-items: center;
    background-color: #e3e3e6;
    padding: 2px;
    border-radius: 12px;
    user-select: none;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.lang-switcher-wrapper input[type="radio"] {
    display: none;
}

.lang-option {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 80px;
    height: 36px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    color: #86868b;
    transition: color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0;
}

.flag {
    font-size: 1.15em;
    filter: grayscale(0.2);
    transition: filter 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* The Moving Selection Pill */
.selection-pill {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 80px;
    height: 36px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

input[name="lang"]#bg:checked ~ .selection-pill {
    transform: translateX(0);
}

input[name="lang"]#en:checked ~ .selection-pill {
    transform: translateX(calc(100% + 22px));
}

/* Active Text Styling */
input[name="lang"]:checked + label {
    color: #1d1d1f;
}

input[name="lang"]:checked + label .flag {
    filter: grayscale(0);
}

/* Interactive Feedback */
.lang-option:active {
    opacity: 0.7;
}

.lang-switcher-wrapper span img {
    height: 18px;
    width: auto;
    display: block;
    border-radius: 50%;
    margin-right: 5px;
}

/* Bulk Controls */
.bulk-controls {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 1em;
    text-align: center;
}

.bulk-controls a {
    color: #ccc;
    text-decoration: none;
    font-weight: 500;
}

.bulk-controls a.active,
.bulk-controls a:hover {
    text-decoration: underline;
    color: #FFE702;
}

.bulk-controls span {
    color: #eee;
    margin: 0 4px;
}

/** Marker popup */
.marker-popup-hover {
    min-width: 150px;
}

.marker-popup-hover h4 {
    margin: 0 0 5px 0;
}

.marker-popup-hover p {
    margin: 0;
    font-size: 1em;
}

/* --- Custom Map Pins --- */
.custom-pin-wrapper {
    background: transparent;
    border: none;
}

.custom-pin-marker {
    width: 25px;
    height: 25px;
    border-radius: 50% 50% 50% 0; /* Creates the teardrop shape */
    transform: rotate(-45deg);    /* Points the sharp corner straight down */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    border: 2px solid #fff;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
}

/* We must rotate the icon back 45 degrees so it stands upright */
.custom-pin-marker i,
.custom-pin-marker span {
    transform: rotate(45deg);
    font-size: 1em;
}

/* Hover Effect: Handled entirely by CSS now! */
.custom-pin-wrapper:hover .custom-pin-marker {
    transform: rotate(-45deg) scale(1.15); /* Grows the pin slightly */
    box-shadow: 3px 3px 6px rgba(0,0,0,0.4);
}

/** Info panel */
#info-panel {
    position: fixed;
    bottom: 0;
    top: 0;
    height: 100vh;
    right: 20px;
    width: 480px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
    background: rgba(255,255,255, 0.5);
    z-index: 1001;
    display: flex; /* Use flexbox to handle internal scrolling better */
    flex-direction: column;
}

#info-panel.hidden {
    display: none;
}

#info-panel-container {
    background: #fff;
    padding: 15px 5px;
    margin: 1%;
    border-radius: 8px;
    position: relative;
    flex: 1;  /* Take remaining height */
    overflow-y: auto; /* scroll INSIDE the panel, not the body */
    overflow-x: hidden;
    height: auto; /* Let it grow/shrink */
    max-height: 100%;
}

#close-panel {
    position: absolute;
    top: 20px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 2em;
    cursor: pointer;
    color: #999;
    z-index: 1002;
    border-radius: 4px;
}

#close-panel:hover {
    color: #000;
    background: #e9ecef;
}

#info-panel h2 {
    margin-top: 0;
    font-size: 1.25em;
    color: #333;
}

#info-panel .data-row {
    margin-bottom: 8px;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
    font-size: 1em;
}

.data-row.flex > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-row.smart-parking-progress .occupied {
    text-align: right;
    font-size: 0.75em;
    color: #666;
    padding: 7px 0;
}

.data-row.smart-parking-progress .progress {
    background:#eee;
    height:10px;
    width:100%;
    border-radius:5px;
    overflow:hidden;
}

#info-panel .toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
}

#info-panel .prop-label {
    color: #666;
    font-size: 1em;
    text-transform: uppercase;
    font-weight: bold;
}

#info-panel .prop-additional {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0 10px;
    font-size: 1em;
}

#info-panel .prop-additional div {
    font-size: 1em;
    text-align: right;
}

#info-panel .prop-additional div:first-child {
    font-weight: bold;
}

#info-panel .prop-value {
    color: #000;
    font-weight: bold;
    font-size: 1em;
}

/* --- Chart Checkbox Toggle Styles --- */
.chart-toggle-checkbox {
    display: none;
}

.chart-toggle-btn {
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s;
    background: transparent;
    color: #999;
    border: 1px solid #ddd;
    display: inline-block;
    margin: 0;
}

.chart-toggle-btn:hover {
    background: #f5f5f5;
    color: #555;
}

/* Highlight style when the preceding checkbox is checked */
.chart-toggle-checkbox:checked + .chart-toggle-btn {
    background-color: #3498db;
    color: #fff;
    border-color: #3498db;
}

/** Chart */
#chart-container {
    max-height: 400px;
    position: sticky;
    bottom: 0;
    left: 0;
    z-index: 999999;
    box-sizing: border-box;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    background: #000;
}

#no-chart-data {
    font-size: 1em;
    color: #999;
}

.chart-datepickers {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.chart-date-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px 0;
    align-items: center;
    font-size: 1em;
}

.chart-date-controls > div {
    display: flex;
    align-items: center;
    gap: 5px;
}

.chart-date-controls > div label {
    color: #ccc;
    margin: 0;
    font-weight: bold;
}

.chart-date-controls > div input {
    padding: 4px;
    border-radius: 4px;
    border: 1px solid #555;
    background: #333;
    color: #fff;
    color-scheme: dark;
}

/** Region controls */
.region-controls .wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    max-height: 300px;
    justify-content: center;
}

.region-item,
.paid-zone-item {
    margin: 0;
}

.region-controls .wrapper input[type="checkbox"] {
    display: none;
}

.region-controls .wrapper label {
    display: inline-block;
    padding: 5px;
    font-size: 0.95em;
    font-weight: 500;
    color: #023664;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    transition: all 0.2s ease-in-out;
    user-select: none;
}

/* Hover Effect */
.region-controls .wrapper label:hover {
    background-color: #e2e8f0;
    transform: translateY(-1px);
}

.region-controls .wrapper input[type="checkbox"]:checked + label {
    background-color: #FFE702;
    border-color: #FFE702;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
}

/** Style checkbox (Filters) */
.checkbox {
    display: inline-block;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    margin-bottom: 0;
}
.checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkbox input:checked ~ .checkbox__checkmark {
    background-color: #FFE702;
}
.checkbox input:checked ~ .checkbox__checkmark:after {
    left: 14px;
    background: #023664;
}
.checkbox:hover input ~ .checkbox__checkmark {
    background-color: #eee;
}
.checkbox:hover input:checked ~ .checkbox__checkmark {
    background-color: #FFE702;
}
.checkbox .checkbox__checkmark {
    position: absolute;
    top: 1px;
    left: 0;
    height: 16px;
    width: 28px;
    background-color: #eee;
    transition: background-color 0.25s ease;
    border-radius: 11px;
}
.checkbox .checkbox__checkmark:after {
    content: "";
    position: absolute;
    left: 3px;
    top: 2px;
    width: 12px;
    height: 12px;
    display: block;
    background-color: #023664;
    border-radius: 50%;
    transition: left 0.25s ease;
}
.checkbox .checkbox__body {
    color: #fff;
    line-height: 1.4;
    font-size: 1.15em;
    transition: color 0.25s ease;
}

.timestamp {
    font-size: 0.75em;
    color: #999;
    display: block;
}

/*---- Action Buttons ----*/
.action-btn {
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background 0.2s;
    background: transparent;
    border: 1px solid transparent;
}

.action-btn:not(.hidden) {
    align-items: center;
    display: flex;
}

.action-btn:hover {
    background: #000;
    color: #fff;
}

#info-panel-container .actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-direction: row;
}

.btn-download-csv {
    background-color: #27ae60;
    color: #fff;
}

.btn-download-csv:hover {
    color: #219150;
    background: #fff;
    border-color: #219150;
}

#btn-full-chart, #btn-full-chart-min {
    background-color: #3498db;
    color: #fff;
}

#btn-full-chart:hover {
    color: #3498db;
    background: #fff;
    border-color: #3498db;
}

/*---- Chart ----*/
#chart-container .modebar-container {
    top: initial !important;
    bottom: 30px !important;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    flex-direction: row;
}

#chart-container .js-plotly-plot .plotly .main-svg {
    width: 100%;
}

#chart-container .js-plotly-plot .plotly .modebar-container .modebar {
    width: 100%;
    left: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
}

#chart-container .js-plotly-plot .plotly .modebar {
    top: 12px;
}

#chart-container .js-plotly-plot .plotly .modebar-container .modebar .modebar-group {
    float: none;
    display: flex;
    box-sizing: border-box;
    padding-left: 8px;
    position: relative;
    vertical-align: middle;
    white-space: nowrap;
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    background: transparent !important;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: #222;
    color: #eee;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    height: 90%;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header h2 {
    margin: 0;
}

.modal-header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

#close-modal {
    color: #aaa;
    font-size: 2em;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}

#close-modal:hover {
    color: #000;
}

/*---- Full Chart ----*/
#full-chart-container {
    flex-grow: 1;
    width: 100%;
    height: 100%;
}

/*---- Sensor Cards ----*/
.sensor-hidden-warning {
    color: #c0392b;
    font-weight: 500;
    font-size: 0.9em;
    padding: 8px 10px;
    margin: 4px 0;
    background: #fdf0f0;
    border-left: 3px solid #c0392b;
    border-radius: 2px;
}

.sensor-card {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    padding: 10px 5px;
    position: relative;
}

.sensor-card h2 .sensor-icon {
    margin-right: 5px;
}

.sensor-icon {
    color: #fff;
    border-radius: 50%;
    padding: 5px;
    border: 2px solid #fff;
}

[class^="icon-taxi"].sensor-icon {
    color: #000;
}

.sensor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.sensor-header h3 {
    margin: 0;
    font-size: 1.25em;
    color: #333;
}

.sensor-card.card-pinned {
    border-left: 4px solid #3498db;
}

.sensor-card.card-preview {
    border-left: 4px solid #95a5a6;
    opacity: 0.95;
}

.sensor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.sensor-card-header h3 {
    margin: 0;
    font-size: 1.25em;
    font-weight: 600;
    color: #333;
}

.sensor-description {
    font-size: 1em;
}

.card-actions {
    display: flex;
    gap: 4px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: #666;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: #e9ecef;
    color: #333;
}

/* Active Pin State */
.btn-icon.active {
    color: #3498db; /* Blue pin when active */
}

.sensor-card-body {
    padding: 5px;
}

/*------ VIDEO PLAYER -------*/

/* Video Wrapper Layout */
.cctv-video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}

.cctv-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: none; /* Important: without this the video won't show up! */
}

/* --- CCTV Directional Markers (SVG Version) --- */

.cctv-icon-wrapper {
    background: transparent;
    border: none;
    overflow: visible !important; /* Allows cone to extend beyond 20px box */
}

/* Root anchor for our custom HTML */
.cctv-root {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The Cone Scaler (Applies Zoom Scale ONLY) */
.cctv-cone-scaler {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;

    /* Only scale this wrapper. The Dot is outside this div. */
    transform: scale(var(--cctv-zoom-scale, 1));
    transform-origin: center center;

    pointer-events: none;
    z-index: 100;

    /* Smooth zoom animation */
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* The Rotator (Applies Direction) */
.cctv-rotator {
    position: absolute;
    top: -50px;  /* Center the 100x100 box on the 0x0 parent */
    left: -50px;
    width: 100px;
    height: 100px;
    /* Rotation is inline in HTML */
}

.cctv-cone-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.cctv-cone-svg path {
    fill: rgba(46, 204, 113, 0.2); /* Increased opacity slightly */
    stroke: #2ecc71;
    stroke-width: 1px; /* Thicker border to be seen */
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke; /* Keeps border crisp even when scaled */
}

.cctv-dot {
    z-index: 200;
}

/* LOD Logic - Hide Scaler when zoomed out */
.leaflet-container.cctv-lod-low .cctv-cone-scaler {
    display: none;
}

/* Responsive */
@media (max-width: 991px) {
    /* --- Transform Info Panel into a Bottom Sheet --- */
    #info-panel {
        top: auto;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 70vh;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
    }

    #info-panel-container {
        margin: 0;
        border-radius: 20px 20px 0 0;
        padding: 0 15px 15px 30px;
    }

    /* ---- Panel Minimize / Compact View ---- */
    #panel-header-bar {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 4px;
        padding: 4px 6px 0;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 10;
    }

    #minimize-panel {
        background: #e9ecef;
        color: #333;
        border: none;
        cursor: pointer;
        font-size: 1.4em;
        padding: 4px 6px;
        border-radius: 4px;
        line-height: 1;
        transition: background 0.2s, color 0.2s;
    }

    /* Minimized bar: compact strip shown instead of the full panel */
    #panel-minimized-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 10px;
        gap: 8px;
        border-bottom: 1px solid #eee;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    #panel-minimized-bar.hidden {
        display: none;
    }

    .minimized-row {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
        overflow: hidden;
        flex: 1;
        min-width: 0;
    }

    /* Each compact sensor chip */
    .minimized-sensor-chip {
        display: flex;
        align-items: center;
        gap: 4px;
        background: #f1f5f9;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        padding: 3px 10px;
        font-size: 0.85em;
        font-weight: 500;
        color: #023664;
        white-space: nowrap;
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
        flex-shrink: 1;
        min-width: 0;
    }

    .minimized-sensor-chip.chip-pinned {
        border-color: #3498db;
        background: #ebf5fb;
    }

    #panel-minimized-actions {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
    }

    /* In minimized mode: hide the full content and bottom action bar */
    #info-panel.panel-minimized #info-content,
    #info-panel.panel-minimized #chart-container,
    #info-panel.panel-minimized .actions {
        display: none;
    }

    #info-panel.panel-minimized {
        height: auto;
        bottom: 0;
        min-height: 0;
        overflow: visible;
    }

    #info-panel.panel-minimized #info-panel-container {
        overflow: visible;
        height: auto;
        max-height: none;
    }

    #info-panel.panel-minimized #info-content,
    #info-panel.panel-minimized #chart-container,
    #info-panel.panel-minimized .actions {
        display: none;
    }

    #close-panel {
        position: sticky;
        top: 0;
        right: 0;
        float: right;
        z-index: 1010;
        background: rgba(255,255,255,0.95);
        border-radius: 50%;
        border: 1px solid #ccc;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        margin-bottom: 4px;
    }

    .mobile-only {
        display: flex;
    }

    #mobile-filter-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        z-index: 10000;
        background: #023664;
        color: #fff;
        border: none;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 1em;
        font-weight: bold;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        align-items: center;
        gap: 5px;
        cursor: pointer;
    }

    #mobile-filter-btn [class^="btn-state-"] {
        align-items: center;
        gap: 6px;
    }

    #mobile-filter-btn.open .btn-state-default {
        display: none !important;
    }

    #mobile-filter-btn.open .btn-state-active {
        display: flex !important;
    }

    #controls {
        top: 0;
        left: 0;
        height: 100vh;
        max-width: 55%;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        width: auto;
    }

    #controls.open {
        transform: translateX(0);
        box-shadow: 10px 0 20px rgba(0,0,0,0.5);
    }

    #close-controls {
        position: absolute;
        top: 20px;
        right: 15px;
        background: transparent;
        border: none;
        color: #aaa;
        font-size: 2em;
        cursor: pointer;
    }

    .region-controls .wrapper {
        max-height: fit-content;
    }

    .checkbox .checkbox__body {
        font-size: 1em;
    }

    #chart-container {
        display: none !important;
    }

    .modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
        margin: 0;
        padding: 20px 10px;
        display: flex;
        flex-direction: column;
        border: none;
    }

    .modal-header {
        margin-top: 60px;
    }

    #modal-chart-container {
        flex-grow: 1;
        width: 100%;
        height: 100%;
    }

    .leaflet-bottom.leaflet-right,
    .leaflet-bottom.leaflet-left {
        bottom: 85vh !important;
        transition: bottom 0.3s ease;
    }

    .info-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }

    .info-actions button,
    .info-actions a {
        width: 100%;
        text-align: center;
        padding: 12px;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }

    #controls {
        padding: 10px 5px;
    }

    #controls .bulk-controls span {
        display: none;
    }

    #controls .bulk-controls a {
        display: block;
        margin-bottom: 10px;
    }

    #close-controls {
        display: none;
    }

    .region-controls .wrapper label {
        font-size: 0.9em;
        padding: 5px;
    }

    .checkbox .checkbox__body {
        font-size: 1em;
    }

    .data-row.flex > div {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }

    #info-panel .prop-additional {
        padding: 0;
    }

    .chart-date-controls {
        flex-direction: column;
    }
}

@media (max-width: 360px) {
    .region-controls .wrapper label {
        padding: 3px;
    }
}

/* Marker cluster per-strategy coloring */
.marker-cluster {
    background: transparent !important;
}

.marker-cluster div {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #fff;
    font-weight: bold;
}

.marker-cluster div i {
    font-size: 0.85em;
}

.marker-cluster-small div {
    width: 30px;
    height: 30px;
    margin: 5px;
    font-size: 12px;
}

.marker-cluster-medium div {
    width: 40px;
    height: 40px;
    margin: 5px;
    font-size: 13px;
}

.marker-cluster-large div {
    width: 50px;
    height: 50px;
    margin: 5px;
    font-size: 14px;
}
