/* =========================================================
   OODOMA SEARCH MAP
   ========================================================= */

#oodoma-search-map {
    width: 100%;
    height: calc(100vh - 170px);
    min-height: 620px;
    background: #f7f7f3;
}

#oodoma-search-map .leaflet-tile-pane {
    filter:
        saturate(0.82)
        contrast(1.04)
        brightness(1.01);
}

#oodoma-search-map .leaflet-control-zoom {
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.14);
}

#oodoma-search-map .leaflet-control-zoom a {
    width: 38px;
    height: 38px;
    border: 0;
    color: #263346;
    font-size: 22px;
    line-height: 38px;
}

#oodoma-search-map .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.88);
    color: #667085;
    font-size: 10px;
}

#oodoma-search-map .leaflet-control-attribution a {
    color: #667085;
}


/* =========================================================
   FULL-WIDTH SEARCH APPLICATION
   ========================================================= */

.oodoma-search-shell {
    position: relative;
    left: 50%;
    width: 100vw;
    max-width: none;
    margin-left: -50vw;
    padding: 0 24px 32px;
}

.oodoma-search-layout {
    display: grid;
    grid-template-columns: minmax(420px, 48%) minmax(0, 52%);
    gap: 0;
    align-items: start;
    min-height: calc(100vh - 180px);
}


/* =========================================================
   FILTERS
   ========================================================= */

.oodoma-mobile-filter-panel,
.oodoma-filter-bar {
    width: 100%;
    max-width: 1200px;
    margin-right: auto;
    margin-left: auto;
}


/* =========================================================
   STICKY DESKTOP MAP
   ========================================================= */

@media (min-width: 768px) {
    .oodoma-search-shell .oodoma-search-layout .oodoma-map-column {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 20px !important;
        align-self: start !important;
        width: 100%;
        height: calc(100vh - 40px);
        min-height: 620px;
        overflow: hidden;
        border-radius: 0;
        box-shadow: none;
    }

    .oodoma-search-shell .oodoma-search-layout #oodoma-search-map {
        width: 100%;
        height: 100%;
        min-height: 620px;
    }
}

/* =========================================================
   MAP MARKER CLICK AREAS
   ========================================================= */

/*
 * Leaflet gives each custom property marker a large invisible box.
 * Disable clicks on that whole box so nearby markers do not block
 * each other when the map is zoomed out.
 */
#oodoma-search-map .leaflet-marker-icon.oodoma-map-price-icon {
    pointer-events: none !important;
}

/* Keep only the visible marker elements clickable */
#oodoma-search-map .oodoma-map-price-pill,
#oodoma-search-map .oodoma-map-selected-card,
#oodoma-search-map .oodoma-marker-cluster,
#oodoma-search-map .oodoma-campus-marker {
    pointer-events: auto !important;
}

/* =========================================================
   RESULTS
   ========================================================= */

.oodoma-results-column {
    min-width: 0;
    padding: 0 28px 40px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 980px) and (min-width: 768px) {
    .oodoma-search-layout {
        grid-template-columns: minmax(320px, 42%) minmax(0, 58%);
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {
    .oodoma-search-shell {
        padding: 0;
    }

    .oodoma-mobile-filter-panel,
    .oodoma-filter-bar {
        width: 100%;
        max-width: none;
        margin-right: 0;
        margin-left: 0;
    }

    .oodoma-search-layout {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-top: 0;
        min-height: auto;
    }

    .oodoma-search-shell .oodoma-search-layout .oodoma-map-column {
        position: relative !important;
        top: auto !important;
        order: 1;
        width: 100vw;
        height: auto;
        min-height: calc(100vh - 150px);
        overflow: hidden;
        border-radius: 0;
    }

    #oodoma-search-map {
        width: 100vw;
        height: calc(100vh - 150px);
        min-height: calc(100vh - 150px);
    }

    .oodoma-results-column {
        order: 2;
        width: 100%;
        padding: 24px 18px 40px;
    }
}