/* ==========================================
   MAPA PAGE — Premium dark layout
   ========================================== */

/* ===== MAP WRAPPER ===== */
.map-page {
    padding: 0;
}

.map-page .map-wrapper {
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
    height: calc(100vh - 130px);
    min-height: 500px;
}

.map-page .map-main {
    flex: 1;
    min-height: 550px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--fv-border-dark);
}

.map-page #map {
    width: 100%;
    height: 100%;
    min-height: 550px;
    border-radius: 0;
    border: none;
}

/* ===== SIDEBAR GLASS DARK ===== */
.map-sidebar--glass {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: var(--fv-glass-dark-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--fv-border-dark);
    border-radius: 20px;
    max-height: calc(100vh - 120px);
    overflow: hidden;
}

.map-sidebar--glass::-webkit-scrollbar {
    width: 4px;
}
.map-sidebar--glass::-webkit-scrollbar-track {
    background: transparent;
}
.map-sidebar--glass::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.map-sidebar--glass .sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.map-sidebar--glass .sidebar-subtitle {
    font-size: 0.8rem;
    color: var(--fv-text-on-dark-body);
    opacity: 0.7;
    margin-bottom: 12px;
}

/* Country filters */
.map-sidebar--glass .country-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.map-sidebar--glass .country-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--fv-text-on-dark-body);
}

.map-sidebar--glass .country-btn:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.map-sidebar--glass .country-btn.active {
    background: var(--fv-gradient-brand);
    border-color: transparent;
    color: #fff;
}

/* Places list in sidebar */
.map-sidebar--glass .places-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
.map-sidebar--glass .places-list::-webkit-scrollbar {
    width: 4px;
}
.map-sidebar--glass .places-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.map-sidebar--glass .place-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--fv-text-on-dark-body);
}

.map-sidebar--glass .place-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(4px);
}

.map-sidebar--glass .place-item.active {
    border-color: var(--fv-uy-celeste);
    background: rgba(0, 163, 224, 0.10);
}

.map-sidebar--glass .place-item-img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.map-sidebar--glass .place-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-sidebar--glass .place-item-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.map-sidebar--glass .place-item-info p {
    font-size: 0.75rem;
    color: var(--fv-text-on-dark-body);
    opacity: 0.7;
    line-height: 1.3;
}

/* ===== MAP MARKERS — SVG PULSE ===== */
.fv-marker-wrap {
    background: transparent;
    border: 0;
}

.fv-marker-pulse {
    position: relative;
    width: 28px;
    height: 28px;
}

.fv-marker-pulse .marker-pin {
    width: 100%;
    height: 100%;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.fv-marker-pulse .marker-pin .marker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: rotate(45deg);
}

.fv-marker-pulse .marker-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: fv-pulse-ring 2s ease-out infinite;
    pointer-events: none;
}

.fv-marker-pulse .marker-pulse-ring--uy {
    border: 2px solid var(--fv-uy-celeste);
}

.fv-marker-pulse .marker-pulse-ring--br {
    border: 2px solid var(--fv-br-green);
}

/* ===== BOTTOM SHEET (mobile) ===== */
.map-bottom-sheet {
    display: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .map-page .map-wrapper {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    .map-sidebar--glass {
        width: 100%;
        max-height: 300px;
        overflow-y: auto;
    }
    .map-sidebar--glass .places-list {
        overflow-y: visible;
        flex: none;
    }
    .map-page .map-main {
        min-height: 400px;
        height: 50vh;
    }
    .map-page #map {
        min-height: 400px;
        height: 50vh;
    }
}

@media (max-width: 768px) {
    .map-page .map-main {
        border-radius: 0;
        border: none;
        min-height: 50vh;
    }
    .map-page #map {
        min-height: 50vh;
    }

    .map-sidebar--glass {
        display: none;
        border-radius: 20px 20px 0 0;
        max-height: 60vh;
    }

    .map-sidebar--glass.open {
        display: flex;
    }

    /* Bottom sheet handle */
    .map-bottom-sheet {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999;
        background: rgba(10, 17, 40, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--fv-border-dark);
        border-radius: 20px 20px 0 0;
        padding: 12px 16px 16px;
        transform: translateY(calc(100% - 60px));
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.40);
    }

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

    .map-bottom-sheet .sheet-handle {
        width: 36px;
        height: 4px;
        border-radius: 2px;
        background: rgba(255, 255, 255, 0.20);
        margin: 0 auto 12px;
        cursor: pointer;
    }

    .map-bottom-sheet .sheet-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
    }

    .map-bottom-sheet .sheet-header h4 {
        font-size: 1rem;
        font-weight: 700;
        color: #fff;
    }

    .map-bottom-sheet .sheet-header .sheet-count {
        font-size: 0.8rem;
        color: var(--fv-text-on-dark-body);
        opacity: 0.7;
    }

    .map-bottom-sheet .country-filters {
        display: flex;
        gap: 6px;
        margin-bottom: 12px;
    }

    .map-bottom-sheet .country-btn {
        flex: 1;
        padding: 6px 12px;
        border-radius: 999px;
        font-size: 0.75rem;
        font-weight: 600;
        cursor: pointer;
        font-family: inherit;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.10);
        color: var(--fv-text-on-dark-body);
        transition: all 0.2s ease;
    }

    .map-bottom-sheet .country-btn.active {
        background: var(--fv-gradient-brand);
        border-color: transparent;
        color: #fff;
    }

    .map-bottom-sheet .places-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        max-height: 50vh;
        overflow-y: auto;
        padding-bottom: 20px;
    }

    .map-bottom-sheet .place-item {
        display: flex;
        gap: 10px;
        padding: 10px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.2s ease;
        color: var(--fv-text-on-dark-body);
    }

    .map-bottom-sheet .place-item:active {
        background: rgba(0, 163, 224, 0.10);
        border-color: var(--fv-uy-celeste);
    }

    .map-bottom-sheet .place-item-img {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        overflow: hidden;
        flex-shrink: 0;
    }

    .map-bottom-sheet .place-item-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .map-bottom-sheet .place-item-info h4 {
        font-size: 0.85rem;
        font-weight: 600;
        color: #fff;
        margin-bottom: 2px;
    }

    .map-bottom-sheet .place-item-info p {
        font-size: 0.7rem;
        color: var(--fv-text-on-dark-body);
        opacity: 0.6;
    }
}
