/* Map/listings page layout and header styles. */

#mapPane.map-pane {
    padding-left: var(--map-page-gutter);
    box-sizing: border-box;
}

#mapPane > #mapboxMap.mapboxgl-map {
    width: 100%;
    margin-left: 0;
    border-left-style: solid;
    border-left-width: 1px;
    border-left-color: rgba(0, 0, 0, 0.14);
    border-top: 1px solid rgba(0, 0, 0, 0.14);
    border-top-left-radius: var(--map-container-radius);
    border-bottom-left-radius: var(--map-container-radius);
    overflow: hidden !important;
    clip-path: inset(0 round var(--map-container-radius) 0 0 var(--map-container-radius));
}

#mapPane > #mapboxMap .mapboxgl-canvas-container,
#mapPane > #mapboxMap .mapboxgl-canvas {
    border-top-left-radius: var(--map-container-radius);
    border-bottom-left-radius: var(--map-container-radius);
}

.map-header-shell {
    display: flex;
    flex-direction: column;
    gap: 0.89rem;
    width: 100%;
}

.map-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    width: 100%;
}

.map-header-bar {
    width: 100%;
}

.map-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.map-header-actions .dropdown-menu {
    background-color: #fff;
    color: #111;
    border-color: rgba(0,0,0,.15);
}

.map-header-actions .dropdown-item {
    color: #111;
}

.map-header-actions .dropdown-item:hover,
    .map-header-actions .dropdown-item:focus {
        background-color: rgba(0,0,0,.06);
        color: #111;
    }

.split-layout {
    position: relative;
    border-bottom: 0 !important;
    margin-top: 0 !important;
}

.split-layout::after {
        content: "";
        position: absolute;
        left: 2rem;
        right: var(--map-page-gutter);
        bottom: 0;
        height: 1px;
        background: rgba(0, 0, 0, 0.14);
        pointer-events: none;
        z-index: 2;
    }

.map-header-controls-bar {
    padding-top: .35rem;
    padding-bottom: .45rem;
    border-top: 0;
}

.map-header-controls-stack {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    width: 100%;
    min-width: 0;
}

.map-header-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    min-width: 0;
}

.map-header-secondary-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
}

.map-header-primary-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    min-width: 0;
}

.map-header-active-filters {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .5rem;
    min-width: 0;
}

.map-header-control-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    min-height: 2.25rem;
    border-radius: 999px;
    white-space: nowrap;
}

.map-header-status-line {
    line-height: 1.35;
}

.map-header-options-panel {
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .75rem;
    width: auto;
    min-width: 0;
    padding-top: 0;
}

.map-header-inline-field {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
}

.map-header-inline-field > span {
        display: inline-block;
        margin: 0 !important;
        line-height: 1;
    }

.map-header-inline-field .form-select-sm {
        min-width: 8.25rem;
    }

.map-header-controls-strip {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
}

.map-header-control-group {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
}

.map-header-main-action-group {
    flex-wrap: nowrap;
}

.map-header-control-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    min-height: 2.25rem;
    border-radius: 999px;
}

.map-header-action-primary {
    background: #eef7ff;
    border: 1px solid rgba(35, 171, 245, .45);
    color: #075985 !important;
    font-weight: 700;
}

.map-header-action-primary:hover,
    .map-header-action-primary:focus {
        background: #dff1ff;
        border-color: rgba(35, 171, 245, .7);
        color: #064e7a !important;
    }

.map-header-action-secondary {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .14);
    color: #2f343a !important;
    font-weight: 650;
}

.map-header-action-secondary:hover,
    .map-header-action-secondary:focus {
        background: #f5f6f8;
        border-color: rgba(0, 0, 0, .22);
        color: #111827 !important;
    }

[data-bs-theme="dark"] .map-header-controls-bar {
    border-top-color: rgba(255, 255, 255, .08);
}

#mapPane.map-pane {
    padding-left: var(--map-page-gutter);
    box-sizing: border-box;
}

#mapPane .mapbox-map-shell {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-top-left-radius: var(--map-container-radius);
    border-bottom-left-radius: var(--map-container-radius);
    overflow: hidden;
}

#mapPane .mapbox-map-shell > #mapboxMap.mapboxgl-map {
        width: 100%;
        height: 100%;
        margin-left: 0;
        margin-top: -1px;
        border-top-left-radius: var(--map-container-radius);
        border-bottom-left-radius: var(--map-container-radius);
        overflow: hidden !important;
    }

#mapPane .mapbox-map-shell > #mapboxMap .mapboxgl-canvas-container,
    #mapPane .mapbox-map-shell > #mapboxMap .mapboxgl-canvas {
        border-top-left-radius: var(--map-container-radius);
        border-bottom-left-radius: var(--map-container-radius);
    }

body.listings-page .map-header-controls-bar .map-header-action-primary {
    --bs-btn-color: #075985;
    --bs-btn-bg: #eef7ff;
    --bs-btn-border-color: rgba(35, 171, 245, .45);
    --bs-btn-hover-color: #064e7a;
    --bs-btn-hover-bg: #dff1ff;
    --bs-btn-hover-border-color: rgba(35, 171, 245, .7);
    --bs-btn-active-color: #064e7a;
    --bs-btn-active-bg: #cdeaff;
    --bs-btn-active-border-color: rgba(35, 171, 245, .8);
    background-color: var(--bs-btn-bg) !important;
    border-color: var(--bs-btn-border-color) !important;
    color: var(--bs-btn-color) !important;
    font-weight: 700;
    box-shadow: none !important;
}

body.listings-page .map-header-controls-bar .map-header-action-primary:hover,
    body.listings-page .map-header-controls-bar .map-header-action-primary:focus {
        background-color: var(--bs-btn-hover-bg) !important;
        border-color: var(--bs-btn-hover-border-color) !important;
        color: var(--bs-btn-hover-color) !important;
    }

body.listings-page .map-header-controls-bar .map-header-action-secondary {
    --bs-btn-color: #2f343a;
    --bs-btn-bg: #fff;
    --bs-btn-border-color: rgba(0, 0, 0, .14);
    --bs-btn-hover-color: #111827;
    --bs-btn-hover-bg: #f5f6f8;
    --bs-btn-hover-border-color: rgba(0, 0, 0, .22);
    --bs-btn-active-color: #111827;
    --bs-btn-active-bg: #e9ecef;
    --bs-btn-active-border-color: rgba(0, 0, 0, .28);
    background-color: var(--bs-btn-bg) !important;
    border-color: var(--bs-btn-border-color) !important;
    color: var(--bs-btn-color) !important;
    font-weight: 650;
    box-shadow: none !important;
}

body.listings-page .map-header-controls-bar .map-header-action-secondary:hover,
    body.listings-page .map-header-controls-bar .map-header-action-secondary:focus {
        background-color: var(--bs-btn-hover-bg) !important;
        border-color: var(--bs-btn-hover-border-color) !important;
        color: var(--bs-btn-hover-color) !important;
    }

.mapbox-map-shell {
		position: relative;
	}
