﻿/* ===================================
   LUXURY LINE — Map Search Component
   Source: luxury-main/css/styles.css
   =================================== */

.map-section {
    width: 100%;
    background: var(--color-background-light, #ebe6e1);
}

.map-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 48px 60px 32px;
    gap: 24px;
    flex-wrap: wrap;
}

.map-section-title {
    font-size: clamp(28px, 3vw, 40px);
    font-weight: var(--font-weight-bold, 700);
    color: var(--color-accent, #8b7355);
    margin: 0;
    line-height: 1.1;
}

.map-filters {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.map-filters .custom-select {
    min-width: 160px;
}

.map-filters .custom-select .custom-select-options {
    bottom: auto;
    top: calc(100% + 8px);
    border-radius: 12px;
}

.map-filter-reset {
    background: rgba(26,26,26,0.08);
    border-color: rgba(26,26,26,0.15);
    color: rgba(26,26,26,0.65);
}

.map-filter-reset:hover {
    background: rgba(197,165,114,0.22);
    border-color: var(--color-accent, #C5A572);
    color: var(--color-accent, #C5A572);
}

.projects-map-wrap {
    position: relative;
    width: 100%;
}

.projects-map {
    width: 100%;
    height: 70vh;
    min-height: 540px;
}

.map-type-toggle {
    position: absolute;
    bottom: 1px;
    left: 70px;
    display: flex;
    background: var(--color-background-light, #ebe6e1);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    z-index: 10;
}

.map-type-btn {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text, #1a1a1a);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
    letter-spacing: 0.2px;
}

.map-type-btn.active {
    background: var(--color-accent, #8b7355);
    color: var(--color-text-white, #ebe6e1);
}

.map-type-btn:not(.active):hover {
    background: var(--color-background-light, #ebe6e1);
}

/* Map Popup */
.map-project-popup {
    position: absolute;
    width: 220px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.32);
    z-index: 1000;
    animation: popupFadeIn 0.22s ease;
    cursor: default;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.map-popup-image-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
}

.map-popup-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.map-project-popup:hover .map-popup-image {
    transform: scale(1.04);
}

.map-popup-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.08) 0%,
        rgba(0,0,0,0.0) 30%,
        rgba(0,0,0,0.55) 70%,
        rgba(0,0,0,0.82) 100%
    );
    z-index: 1;
}

.map-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.45);
    color: var(--color-text-white, #ebe6e1);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s ease;
}

.map-popup-close:hover {
    background: rgba(0,0,0,0.72);
}

.map-popup-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 16px 18px;
    z-index: 2;
}

.map-popup-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text-white, #ebe6e1);
    margin: 0 0 4px;
    line-height: 1.15;
    letter-spacing: -0.3px;
}

.map-popup-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: rgba(255,255,255,0.82);
    margin: 0 0 14px;
}

.map-popup-cta {
    display: block;
    width: 100%;
    padding: 10px 0;
    background: var(--color-accent, #8b7355);
    color: var(--color-text-white, #ebe6e1);
    border: none;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    text-align: center;
    text-decoration: none;
}

.map-popup-cta:hover {
    background: var(--color-accent-light, #a89080);
    transform: translateY(-1px);
}

/* Google Maps InfoWindow override */
.lux-map-popup {
    font-family: var(--font-primary);
}

.lux-map-popup__body {
    padding: 12px;
}

.lux-map-popup__name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--color-text);
}

.lux-map-popup__city {
    font-size: 13px;
    color: var(--color-text-light);
    margin: 0 0 4px;
}

.lux-map-popup__price {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-accent);
    margin: 0 0 8px;
}

.lux-map-popup__btn {
    display: inline-block;
    padding: 6px 16px;
    background: var(--color-accent);
    color: var(--color-text-white, #ebe6e1);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0.02em;
}

/* Responsive */
@media (max-width: 768px) {
    .map-section-header {
        padding: 32px 24px 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .map-filters {
        width: auto;
        margin-left: 76px;
        margin-right: 76px;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: stretch;
        flex-wrap: initial;
    }

    .map-filters .custom-select {
        width: 100%;
        min-width: 0;
    }

    .map-filters .custom-select-trigger {
        padding: 12px 20px !important;
        background-color: var(--color-background-light, #ebe6e1) !important;
        border: none !important;
        border-radius: 30px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        color: #1A1A1A !important;
    }

    .map-filters .custom-select-options {
        z-index: 120;
    }

    .map-filters .cascade-sep {
        display: none;
    }

    .map-filter-reset {
        justify-self: center;
    }

    .projects-map {
        height: 70vh;
        min-height: 480px;
    }

    .map-type-toggle {
        bottom: 610px;
        left: 9px;
    }
}