.map-page-wrap {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 72px);
}

.map-page-header {
    border-bottom: 1px solid var(--hopn-border, rgba(255, 255, 255, 0.08));
    background: var(--hopn-card-bg, rgba(12, 16, 28, 0.92));
}

.map-city-select,
.map-radius-select {
    min-width: 140px;
    max-width: 180px;
}

.map-layout {
    display: flex;
    flex: 1;
    min-height: 0;
}

.map-sidebar {
    width: 360px;
    max-width: 36vw;
    border-right: 1px solid var(--hopn-border, rgba(255, 255, 255, 0.08));
    background: var(--hopn-body-bg, #070b14);
}

.map-sidebar-filters {
    max-height: 42vh;
    overflow: auto;
    border-radius: 0;
    border-bottom: 1px solid var(--hopn-border, rgba(255, 255, 255, 0.08));
}

.map-sidebar-list {
    border-radius: 0;
    min-height: 0;
    overflow: hidden;
}

.map-main {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.map-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: var(--hopn-card-bg, rgba(12, 16, 28, 0.92));
    border-bottom: 1px solid var(--hopn-border, rgba(255, 255, 255, 0.08));
    z-index: 500;
}

.hopn-map {
    flex: 1;
    min-height: 420px;
    background: #0d1117;
}

.map-nearest-list {
    overflow-y: auto;
    max-height: calc(58vh - 80px);
}

.map-nearest-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--hopn-border, rgba(255, 255, 255, 0.06));
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.map-nearest-item:hover,
.map-nearest-item:focus {
    background: rgba(15, 76, 255, 0.08);
    color: inherit;
}

.map-nearest-item.active {
    background: rgba(212, 175, 55, 0.12);
}

.map-nearest-avatar {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.map-nearest-meta h3 {
    font-size: 0.95rem;
    margin: 0 0 0.15rem;
}

.map-nearest-meta p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--hopn-muted, #9aa4b2);
}

.map-nearest-distance {
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--hopn-gold, #d4af37);
    white-space: nowrap;
}

.map-mobile-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hopn-card-bg, rgba(12, 16, 28, 0.96));
    border-top: 1px solid var(--hopn-border, rgba(255, 255, 255, 0.08));
    border-radius: 16px 16px 0 0;
    z-index: 600;
    transform: translateY(calc(100% - 56px));
    transition: transform 0.25s ease;
}

.map-mobile-sheet.open {
    transform: translateY(0);
}

.map-mobile-sheet-handle {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0.65rem 1rem 0.5rem;
}

.map-mobile-sheet-bar {
    display: block;
    width: 42px;
    height: 4px;
    margin: 0 auto 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
}

.map-mobile-sheet-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
}

.map-nearest-list-mobile {
    max-height: 42vh;
}

.map-filter-offcanvas {
    max-width: 360px;
}

.leaflet-container {
    font-family: inherit;
}

.hopn-map-marker-popup .leaflet-popup-content {
    margin: 0.75rem;
    min-width: 200px;
}

.map-popup-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.map-popup-card h3 {
    font-size: 1rem;
    margin: 0 0 0.25rem;
}

.map-popup-card .map-popup-meta {
    font-size: 0.78rem;
    color: var(--hopn-muted, #9aa4b2);
    margin-bottom: 0.5rem;
}

.map-popup-actions {
    display: flex;
    gap: 0.5rem;
}

.map-popup-actions .btn {
    flex: 1;
    font-size: 0.78rem;
}

.map-user-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0f4cff;
    border: 3px solid #fff;
    box-shadow: 0 0 0 4px rgba(15, 76, 255, 0.35);
}

@media (max-width: 991.98px) {
    .map-page-wrap {
        min-height: calc(100vh - 64px);
    }

    .hopn-map {
        min-height: calc(100vh - 180px);
    }
}
