html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

.main-wrapper {
    position: relative;
    width: 100vw;
    height: calc(100vh - 50px);
    flex: 1 1 auto;
    min-height: 0;
}

#mapContainer {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.search-panel {
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 1000;
    width: 600px;
    max-width: 90vw;
    box-sizing: border-box;
}

.administrative-filter-panel {
    position: absolute;
    top: 15px;
    right: 280px;
    z-index: 1000;
    width: 240px;
    font-size: .85rem;
}

#searchSuggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1100;
    box-sizing: border-box;
}

.filters-panel {
    position: absolute;
    top: 15px;
    right: 25px;
    z-index: 1000;
    width: 240px;
    font-size: 0.85rem;
}

.filter-header-cursor {
    cursor: pointer;
}

#schoolCard {
    border: none;
}

#schoolCardBody h6 {
    margin-bottom: 0.2rem;
    padding-right: 40px;
    overflow-wrap: break-word;
}

#schoolCardBody p {
    margin-bottom: 0.75rem;
}

.location-button {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
}

.location-button:hover {
    background: #f8f9fa;
}

.location-button:active {
    transform: scale(0.95);
}

.location-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #6f42c1;
}

.user-location-marker {
    background: transparent;
    border: none;
}

.user-location-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #6f42c1;
    border: 3px solid #ffffff;
    box-shadow:
        0 0 0 2px rgba(111, 66, 193, 0.25);
}

#filtersBody {
    max-height: calc(100vh - 230px);
    overflow-y: auto;
}

.comparison-back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #495057;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
}

.comparison-back-button:hover {
    background: #f8f9fa;
}

.comparison-back-button:active {
    transform: scale(0.95);
}

#mapContainer.spatial-analysis-mode .leaflet-tile {
    filter: grayscale(100%) brightness(1.08) contrast(0.85);
}

.spatial-options-panel {
    position: absolute;
    top: 15px;
    right: 25px;
    z-index: 1000;
    width: 240px;
    font-size: 0.85rem;
}

.search-panel > .d-flex > .card.flex-grow-1 {
    min-width: 0;
}

#spatialAnalysisEntry {
    flex: 0 0 auto;
}

#searchSuggestions .list-group-item {
    white-space: normal;
    overflow-wrap: anywhere;
}

.search-panel.comparison-map-mode {
    width: 400px;
}