/* ============================================================ *
 *  Parking detail page                                          *
 * ============================================================ */

.parking-detail {
    width: 100%;
}

/* (KPI strip + stat tile styles live in site.css so spot/device pages
 *  inherit them too.) */

/* Map / Heatmap container -------------------------------------- */

/* Make the map card body flex so the map fills whatever height the
 * row stretches to (events column usually drives the row height). */
.parking-detail .card-body {
    display: flex;
    flex-direction: column;
}

.parking-detail .map-box,
.parking-detail .heatmap-box {
    flex: 1 1 auto;
    width: 100%;
    min-height: 360px;
    border-radius: 6px;
    overflow: hidden;
}

.map-legend {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.94);
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    pointer-events: none;
}

.map-legend > div {
    display: flex;
    align-items: center;
    gap: .35rem;
    line-height: 1.3;
}

.lg {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid #546e7a;
}
.lg-free  { background: #a5d6a7; }
.lg-occ   { background: #ef9a9a; }
.lg-unk   { background: #cfd8dc; }
.lg-stale { background: #ffcc80; }

/* (Events list / .event-row / .empty-state / .kpi-strip mobile —
 *  all in site.css now since they're shared with spot/device pages.) */

/* ============================================================ *
 *  Mobile responsive tweaks (parking-detail-only)               *
 * ============================================================ */

@media (max-width: 575.98px) {
    /* Map a bit shorter on phones to leave room for content below */
    .parking-detail .map-box,
    .parking-detail .heatmap-box {
        min-height: 280px;
    }

    /* Chart card header — stack title and controls vertically so
     * datetime inputs don't overflow. Inputs go full-width. */
    .parking-detail .card-header.flex-wrap {
        flex-direction: column;
        align-items: stretch !important;
    }
    .parking-detail .card-header input[type="datetime-local"] {
        width: 100% !important;
    }
    .parking-detail .card-header .btn-group {
        width: 100%;
    }
    .parking-detail .card-header .d-flex.align-items-center.gap-2 {
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
    }

    /* Events search box: full width by default already (form-control), good */
}

@media (max-width: 767.98px) {
    /* Parking page header: title and "All sites" stack vertically with gap */
    .parking-detail header {
        flex-direction: column;
        align-items: flex-start !important;
    }
}
