#map-dashboard,
#map-area-editor,
.ticket-location-map,
#layer-preview-map {
    min-height: 420px;
    width: 100%;
}

#map-dashboard {
    min-height: 520px;
}

#layer-preview-map {
    height: 420px;
}

.ticket-location-map {
    min-height: 260px;
}

.dashboard-ticket-map {
    height: 320px;
    min-height: 320px;
}

#ticketMap.maximized-card {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    border-radius: 0 !important;
}

#ticketMap.maximized-card .card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

#ticketMap.maximized-card .dashboard-ticket-map {
    height: 100%;
    min-height: 100%;
}

.map-full-height-card .card-body {
    height: calc(100vh - 240px);
}

.map-layer-list {
    max-height: 260px;
    overflow-y: auto;
}

.map-legend .legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.35rem;
}

.map-legend .legend-swatch {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 0.5rem;
    border: 1px solid rgba(0,0,0,0.15);
}

.map-dashboard-sidebar .card {
    margin-bottom: 1rem;
}

.map-dashboard-sidebar .card:last-of-type {
    margin-bottom: 0;
}

.map-settings-page #map-area-editor {
    min-height: 540px;
}

#ticket-location-card .card-body {
    padding: 0;
}

#map-point-picker {
    min-height: 320px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.25rem;
}

.map-pin-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    margin-right: 0.25rem;
}

/* Avoid 404 for missing Leaflet images when using local leaflet.css */
.leaflet-control-layers-toggle{ background-image: none !important; }


    /* Dashboard map: show a proper layers icon instead of empty square */
    #dashboard-interactive-map .leaflet-control-layers-toggle {
        background-image: none !important;
        width: 34px !important;
        height: 34px !important;
        border-radius: 10px !important;
        background: rgba(255, 255, 255, 0.96) !important;
        border: 1px solid rgba(0, 0, 0, .08) !important;
        box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #dashboard-interactive-map .leaflet-control-layers-toggle::before {
        content: "\f5fd";
        /* fa-layer-group */
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        font-size: 14px;
        color: #111827;
    }

    #dashboard-interactive-map .leaflet-control-layers-expanded {
        border-radius: 12px;
        overflow: hidden;
    }