.office-map-page {
    --office-surface: #fff;
    --office-soft: #eef4fa;
    --office-ink: #172b3a;
    --office-muted: #526777;
    --office-border: #d5e0e9;
    --office-control: #8498aa;
    --office-accent: #084fb9;
    --office-atase: #b1373d;
    --office-itpc: #28744b;
    padding-block-end: clamp(28px, 5vw, 58px);
    color: var(--office-ink);
    font-family: Inter, sans-serif;
}

[data-theme="dark"] .office-map-page {
    --office-surface: #182b3c;
    --office-soft: #243a50;
    --office-ink: #edf4fb;
    --office-muted: #b9cada;
    --office-border: #3b5368;
    --office-control: #7891a8;
    --office-accent: #a6caff;
    --office-atase: #ff9498;
    --office-itpc: #83d7a7;
    color-scheme: dark;
}

.office-map-page > .page-breadcrumb-banner {
    margin-block-end: clamp(20px, 3vw, 34px);
}

.office-map-panel {
    position: relative;
    overflow: visible;
    border: 1px solid var(--office-border);
    border-radius: 14px;
    background: var(--office-surface);
}

.office-map-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 12px 24px;
    padding: clamp(12px, 2.2vw, 20px);
}

.office-map-filter {
    min-width: 0;
    width: min(100%, 420px);
}

.office-map-filter label {
    display: block;
    margin-block-end: 6px;
    color: var(--office-ink);
    font-size: .875rem;
    font-weight: 650;
}

.office-map-filter select,
.office-map-filter .select2-container--default .select2-selection--single {
    width: 100%;
    min-height: 44px;
    height: auto;
    border: 1px solid var(--office-control);
    border-radius: 8px;
    background: var(--office-surface);
    color: var(--office-ink);
    font: inherit;
}

.office-map-filter select {
    padding: 8px 12px;
}

.office-map-filter .select2-container--default .select2-selection__rendered {
    padding: 10px 38px 10px 12px;
    color: var(--office-ink);
    line-height: 1.45;
}

.office-map-filter .select2-container--default .select2-selection__arrow {
    inset: 0 10px 0 auto;
    height: auto;
}

.office-map-filter .select2-container--default .select2-selection__arrow b {
    border-top-color: var(--office-muted);
}

.office-map-filter .select2-dropdown,
.office-map-filter .select2-search--dropdown .select2-search__field {
    border-color: var(--office-control);
    background: var(--office-surface);
    color: var(--office-ink);
}

.office-map-filter .select2-container--default .select2-results__option[aria-selected="true"] {
    background: var(--office-soft);
    color: var(--office-ink);
}

.office-map-filter .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #084fb9;
    color: #fff;
}

.office-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 0;
    padding: 0 0 4px;
    color: var(--office-muted);
    font-size: .8125rem;
    list-style: none;
}

.office-map-legend li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.office-map-legend i {
    font-size: 1.2em;
}

.office-map-legend li:first-child i { color: var(--office-itpc); }
.office-map-legend li:last-child i { color: var(--office-atase); }

.office-map-status {
    margin: 0;
    padding: 0 clamp(12px, 2.2vw, 20px) 10px;
    color: var(--office-muted);
    font-size: .8125rem;
}

.office-map-status:empty {
    position: absolute;
    padding: 0;
}

.office-map-canvas {
    z-index: 0;
    width: 100%;
    height: clamp(390px, 62vh, 620px);
    border-block-end: 1px solid var(--office-border);
    border-radius: 13px 13px 0 0;
    background: var(--office-soft);
}

.office-map-page :is(select, .select2-selection, .select2-search__field, .leaflet-marker-icon, .leaflet-container, .leaflet-popup-content, .leaflet-container a):focus-visible {
    outline: 2px solid var(--office-accent);
    outline-offset: 2px;
}

.office-map-page .office-map-popup .leaflet-popup-content-wrapper,
.office-map-page .office-map-popup .leaflet-popup-tip {
    border: 0 !important;
    background: var(--office-surface) !important;
    color: var(--office-ink);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.office-map-page .office-map-popup .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 12px !important;
    box-shadow: 0 6px 22px rgb(15 38 62 / 28%) !important;
}

.office-map-page .office-map-popup .leaflet-popup-tip {
    border-radius: 2px !important;
    box-shadow: none !important;
}

.office-map-popup .leaflet-popup-content {
    box-sizing: border-box;
    width: min(380px, calc(100vw - 76px)) !important;
    max-height: min(276px, 46vh);
    margin: 0;
    padding: 17px 18px 18px;
    overflow: auto;
    border-radius: 12px;
    color: var(--office-ink);
    font: .8125rem/1.45 Inter, sans-serif;
    overflow-wrap: anywhere;
    scrollbar-gutter: stable;
}

.office-map-popup .leaflet-popup-content :is(h2, h6) {
    max-width: none !important;
    margin: 0 0 10px !important;
    padding-inline-end: 34px;
    color: var(--office-ink) !important;
    font: 700 clamp(.875rem, 1.7vw, 1rem)/1.4 Sora, sans-serif !important;
}

.office-map-popup .maps-popup {
    min-width: 0;
    max-width: none;
    max-height: none;
}

.office-map-page .office-map-popup .maps-popup table {
    width: 100% !important;
}

.office-map-popup table {
    width: 100%;
    table-layout: fixed;
    margin: 0 0 4px;
    border-collapse: collapse;
    font: inherit;
}

.office-map-popup table tr,
.office-map-popup table td,
.office-map-popup table th {
    background: transparent;
}

.office-map-popup table :is(td, th) {
    padding: 5px 0;
    border: 0;
    vertical-align: top;
    color: var(--office-ink);
}

.office-map-popup table tr + tr :is(td, th) {
    border-block-start: 1px solid var(--office-border);
}

.office-map-popup table :is(td, th):first-child {
    width: 7em;
    padding-inline-end: 8px;
    color: var(--office-muted);
    font-weight: 600;
    text-align: start;
}

.office-map-field-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.office-map-field-label i {
    display: inline-grid;
    flex: 0 0 19px;
    place-items: center;
    width: 19px;
    height: 19px;
    border-radius: 4px;
    background: var(--office-soft);
    color: var(--office-accent);
    font-size: .6875rem;
}

.office-map-popup table td:nth-child(2) { display: none; }
.office-map-popup table td:last-child { padding-inline-start: 0 !important; }

.office-map-page .leaflet-container .office-map-popup a {
    color: var(--office-accent);
}

.office-map-page .leaflet-container .office-map-popup .office-map-directions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-block-start: 8px;
    padding: 7px 12px;
    border: 1px solid var(--office-border);
    border-radius: 8px;
    background: var(--office-soft);
    color: var(--office-accent);
    font: 650 .8125rem/1.4 Inter, sans-serif;
    text-decoration: none;
}

.office-map-directions i {
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1;
}

.office-map-page .leaflet-container .office-map-popup .office-map-directions:hover {
    border-color: var(--office-accent);
    color: var(--office-accent);
}

.office-map-page .leaflet-container .office-map-popup a.leaflet-popup-close-button {
    display: grid;
    place-items: center;
    inset: 5px 7px auto auto !important;
    width: 44px;
    height: 44px;
    padding: 0 !important;
    border-radius: 50%;
    background: radial-gradient(circle, var(--office-soft) 0 14px, transparent 14.5px);
    color: var(--office-accent) !important;
    font: 600 1.15rem/1 Inter, sans-serif !important;
}

.office-map-page .leaflet-container .office-map-popup a.leaflet-popup-close-button:hover {
    background: radial-gradient(circle, #084fb9 0 14px, transparent 14.5px);
    color: #fff !important;
}

@media (max-width: 575px) {
    .office-map-canvas {
        height: clamp(360px, 63vh, 500px);
    }

    .office-map-popup .leaflet-popup-content {
        max-height: min(240px, 42vh);
        padding: 15px 13px 16px;
        font-size: .75rem;
    }
}
