/* Responsive layer for Location/IndexResponsive without modifying legacy styles */
.body-container {
    min-height: calc(100vh - 120px);
    width: 100%;
}

.tab-content {
    height: auto !important;
    flex: 1;
}

.maps-container {
    margin: 1rem !important;
}

.controls-container {
    gap: 0.75rem;
}

.location-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.location-table-wrap table {
    min-width: 760px;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
    background-color: #038443;
}

table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
    background-color: #0f5132;
}

table.dataTable > tbody > tr.child ul.dtr-details {
    width: 100%;
}

table.dataTable > tbody > tr.child ul.dtr-details li {
    border-bottom: 1px solid #e9ecef;
    padding: 0.45rem 0;
}

.location-mobile-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.location-mobile-tab {
    border: 1px solid #cde7d6;
    background: #f4fbf7;
    color: #0f5132;
    border-radius: 0.5rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
}

.location-mobile-tab.active {
    background: #038443;
    border-color: #038443;
    color: #fff;
}

.location-map-modal-content .map-frame {
    display: block;
    width: 100%;
    height: min(72vh, 720px);
    border: 0;
}

.map-empty-state {
    display: grid;
    place-items: center;
    min-height: 260px;
    padding: 1.25rem;
    text-align: center;
    color: #5c636a;
    background: #f8f9fa;
}

@media (max-width: 991.98px) {
    .body-container {
        min-height: 0;
        display: block !important;
    }

    .tab-pane {
        margin-left: 0 !important;
    }

    .maps-container {
        margin: 0.75rem !important;
    }

    .controls-container {
        padding: 0.5rem;
        align-items: stretch !important;
    }

    .controls-container > div:first-child,
    .controls-container .custom-search {
        width: 100%;
    }

    .custom-search {
        display: flex;
        width: 100%;
        gap: 0.5rem;
    }

    .custom-search input {
        flex: 1;
        min-width: 0;
    }

    .custom-search button {
        flex: 0 0 auto;
        min-width: 44px;
    }

    .location-map-modal-content .map-frame {
        height: 62vh;
    }

    .location-table-wrap table {
        min-width: 100%;
    }
}

@media (max-width: 575.98px) {
    .location-mobile-tabs {
        grid-template-columns: 1fr;
    }

    .maps-container .section-title {
        font-size: 1.05rem;
        line-height: 1.35;
        margin-bottom: 0.5rem;
    }

    .controls-container h3.fs-5 {
        font-size: 1rem !important;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 0.3rem 0.45rem;
    }
}