/* =========================================================
           MAP
           ========================================================= */

    #explorerMap {
        position: fixed;
        inset: 0;
        z-index: 1;
    }


    /* =========================================================
           TOP BAR
           ========================================================= */

    .explorer-topbar {
        position: absolute;
        top: 15px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
        width: min(700px, calc(100% - 30px));
        display: flex;
        gap: 8px;
    }


    .explorer-city {
        width: 160px;
        flex-shrink: 0;
        height: 44px;
        border: none;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 3px 15px rgba(0,0,0,.18);
        padding: 0 12px;
        outline: none;
    }


    .explorer-search {
        flex: 1;
        position: relative;
    }


        .explorer-search input {
            width: 100%;
            height: 44px;
            border: none;
            border-radius: 12px;
            background: #fff;
            box-shadow: 0 3px 15px rgba(0,0,0,.18);
            padding: 0 42px 0 15px;
            outline: none;
        }


    .explorer-search-icon {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: #777;
        pointer-events: none;
    }


    /* =========================================================
           CITY SEARCH RESULT
           ========================================================= */

    .city-search-results {
        position: absolute;
        top: 50px;
        right: 0;
        width: 100%;
        max-height: 300px;
        overflow-y: auto;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 5px 20px rgba(0,0,0,.2);
        display: none;
        overflow: hidden;
    }


    .city-search-item {
        padding: 10px 14px;
        cursor: pointer;
        border-bottom: 1px solid #eee;
        font-size: 14px;
    }


        .city-search-item:hover {
            background: #f5f5f5;
        }


    /* =========================================================
           LOCATION PANEL
           ========================================================= */

    .locations-panel {
        position: absolute;
        z-index: 1000;
        left: 20px;
        bottom: 20px;
        width: 390px;
        height: 55vh;
        max-height: 700px;
        max-height: calc(100vh - 40px);
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0,0,0,.2);
        overflow: hidden;
    }


    /* =========================================================
           DRAG AREA
           ========================================================= */

    .sheet-drag-area {
        display: none;
    }


    .sheet-handle {
        width: 45px;
        height: 5px;
        background: #bbb;
        border-radius: 10px;
        margin-bottom: 5px;
    }


    /* =========================================================
           LIST
           ========================================================= */

    .locations-list {
        overflow-y: auto;
        max-height: calc(100vh - 100px);
        padding: 8px;
    }


    /* =========================================================
           LOCATION CARD
           ========================================================= */

    .location-card {
        display: flex;
        gap: 10px;
        padding: 10px;
        margin-bottom: 8px;
        border-radius: 12px;
        background: #fff;
        border: 1px solid #eee;
        cursor: pointer;
        transition: .2s;
    }


        .location-card:hover {
            background: #f8f8f8;
        }


    .location-card-image {
        width: 90px;
        height: 70px;
        object-fit: cover;
        border-radius: 8px;
        flex-shrink: 0;
    }


    .location-card-content {
        flex: 1;
        min-width: 0;
    }


    .location-card-title {
        font-weight: 700;
        font-size: 14px;
        margin-bottom: 5px;
    }


    .location-card-meta {
        font-size: 12px;
        color: #777;
    }


    /* =========================================================
           SELECTED SLIDER CARD
           ========================================================= */

    .selected-location {
        padding: 8px;
    }


    .selected-location-image-wrapper {
        position: relative;
        cursor: pointer;
    }


    .selected-location-image {
        width: 100%;
        height: 180px;
        object-fit: cover;
        border-radius: 12px;
    }


    .selected-location-title {
        font-size: 18px;
        font-weight: 700;
        margin-top: 10px;
    }


    .selected-location-meta {
        font-size: 13px;
        color: #777;
        margin-top: 5px;
    }


    .selected-location-description {
        font-size: 13px;
        color: #666;
        margin-top: 10px;
        line-height: 1.8;
    }


    .selected-location-navigation {
        display: flex;
        gap: 8px;
        margin-top: 12px;
    }


        .selected-location-navigation button {
            flex: 1;
        }


    .back-to-list {
        margin-bottom: 8px;
        border: none;
        background: #f1f1f1;
        border-radius: 8px;
        padding: 6px 12px;
        font-size: 13px;
    }


    /* =========================================================
           SHOW MAP BUTTON
           ========================================================= */

    .show-map-button {
        display: none;
    }


    /* =========================================================
           CLUSTER
           ========================================================= */

    .explorer-cluster {
        background: transparent;
        border: none;
    }


        .explorer-cluster div {
            width: 46px;
            height: 46px;
            border-radius: 50%;
            background: #1976d2;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: 700;
            border: 3px solid rgba(255,255,255,.9);
            box-shadow: 0 2px 8px rgba(0,0,0,.3);
        }


    /* =========================================================
           MOBILE
           ========================================================= */

    @media (max-width: 767px) {
        .explorer-topbar

    {
        top: 10px;
        width: calc(100% - 100px);
        gap: 6px;
    }


    .explorer-city {
        width: 110px;
        font-size: 13px;
    }


    .explorer-search input {
        height: 42px;
    }


    .locations-panel {
        left: 0;
        bottom: 0;
        width: 100%;
            height: 55vh;
            max-height: 80vh;
            overflow: hidden;
        border-radius: 18px 18px 0 0;
        transition: height .25s ease;
        display: flex;
        flex-direction: column;
    }


        .locations-panel.dragging {
            transition: none;
        }


    .sheet-drag-area {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 42px;
        min-height: 42px;
        cursor: grab;
        touch-action: none;
        user-select: none;
        flex-shrink: 0;
    }


    .locations-list {
        flex: 1;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        padding: 8px;
    }


    .show-map-button {
        position: absolute;
        top: -52px;
        left: 50%;
        transform: translateX(-50%);
        display: none;
        border: none;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,.2);
        border-radius: 20px;
        padding: 8px 18px;
        z-index: 1001;
    }


    .locations-panel.expanded .show-map-button,
    .locations-panel.full .show-map-button {
        display: block;
    }


    .selected-location-image {
        height: 170px;
    }

    }

/* Selected card should have more space on mobile */
@media (max-width: 767px) {
    .locations-panel.selected-card-open {
        height: 65vh;
        max-height: 85vh;
    }
}

