/**
 * Foxim Single Property Map - Styles
 * Carte interactive + calculateur de trajet multimodal
 * Design inspiré Zillow/Redfin - "Don't make me think"
 * @version 2.0.0
 */

/* === Conteneur carte === */

#foxim-wizard-wrapper .foxim-map-section {
    margin: 40px 0;
}

#foxim-wizard-wrapper .foxim-single-map-container {
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

#foxim-wizard-wrapper #foxim-single-map {
    width: 100%;
    height: 450px;
    z-index: 1;
}

/* === Marqueurs Leaflet personnalisés === */

#foxim-wizard-wrapper .foxim-price-marker {
    background: transparent !important;
    border: none !important;
}

#foxim-wizard-wrapper .foxim-price-marker-inner {
    background: white;
    border: 2px solid #E85D04;
    border-radius: 24px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 14px;
    color: #E85D04;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-align: center;
}

#foxim-wizard-wrapper .foxim-price-marker-inner:hover {
    background: #E85D04;
    color: white;
    transform: scale(1.15);
    box-shadow: 0 8px 20px rgba(232, 93, 4, 0.4);
}

#foxim-wizard-wrapper .foxim-poi-marker {
    background: transparent !important;
    border: none !important;
}

#foxim-wizard-wrapper .foxim-poi-marker-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

#foxim-wizard-wrapper .foxim-poi-marker-icon:hover {
    transform: scale(1.2);
}

/* Popups Leaflet */

#foxim-wizard-wrapper .foxim-property-popup strong {
    color: #1D2D44;
    font-size: 14px;
}

#foxim-wizard-wrapper .foxim-property-popup span {
    color: #6B7280;
    font-size: 12px;
}

/* Popup simple du bien (page single property) */
#foxim-wizard-wrapper .foxim-property-popup-simple {
    padding: 12px 14px;
    background: #FAFAFA;
    border-left: 3px solid #E85D04;
    line-height: 1.5;
}

#foxim-wizard-wrapper .foxim-property-popup-simple strong {
    color: #1D2D44;
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

#foxim-wizard-wrapper .foxim-property-popup-simple span {
    color: #6B7280;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

#foxim-wizard-wrapper .foxim-poi-popup {
    text-align: center;
}

#foxim-wizard-wrapper .foxim-poi-popup strong {
    color: #1D2D44;
    font-size: 13px;
    display: block;
    margin-bottom: 4px;
}

#foxim-wizard-wrapper .foxim-poi-category {
    display: inline-block;
    background: #F4F6F8;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #6B7280;
    margin-bottom: 4px;
}

#foxim-wizard-wrapper .foxim-poi-distance {
    font-size: 12px;
    color: #E85D04;
    font-weight: 600;
}

/* === Widget Calculateur de trajet === */

#foxim-wizard-wrapper .foxim-travel-widget {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 28px;
    margin-top: 20px;
}

/* Header widget */

#foxim-wizard-wrapper .foxim-travel-header {
    margin-bottom: 24px;
}

#foxim-wizard-wrapper .foxim-travel-widget h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1D2D44;
    margin: 0 0 8px 0;
}

#foxim-wizard-wrapper .foxim-travel-subtitle {
    font-size: 15px;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

/* === Recherche d'adresse (en haut) === */

#foxim-wizard-wrapper .foxim-custom-search {
    position: relative;
    margin-bottom: 20px;
}

#foxim-wizard-wrapper .foxim-custom-search label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1D2D44;
    margin-bottom: 10px;
}

#foxim-wizard-wrapper .foxim-custom-search label svg {
    width: 20px;
    height: 20px;
    color: #E85D04;
}

#foxim-wizard-wrapper #foxim-address-search {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    background: #FAFAFA;
}

#foxim-wizard-wrapper #foxim-address-search:focus {
    outline: none;
    border-color: #E85D04;
    background: white;
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.1);
}

#foxim-wizard-wrapper #foxim-address-search::placeholder {
    color: #9CA3AF;
    font-style: italic;
}

/* Résultats autocomplete */

#foxim-wizard-wrapper .foxim-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
    display: none;
}

#foxim-wizard-wrapper .foxim-search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #F3F4F6;
}

#foxim-wizard-wrapper .foxim-search-result-item:last-child {
    border-bottom: none;
}

#foxim-wizard-wrapper .foxim-search-result-item:hover {
    background: #FEF3E7;
}

#foxim-wizard-wrapper .foxim-search-result-item strong {
    display: block;
    font-size: 14px;
    color: #1D2D44;
    margin-bottom: 2px;
}

#foxim-wizard-wrapper .foxim-search-result-item small {
    font-size: 12px;
    color: #6B7280;
}

#foxim-wizard-wrapper .foxim-search-no-result {
    padding: 16px;
    text-align: center;
    color: #9CA3AF;
    font-size: 14px;
}

/* === Suggestions rapides (badges) === */

#foxim-wizard-wrapper .foxim-quick-suggestions {
    margin-bottom: 24px;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
}

#foxim-wizard-wrapper .foxim-suggestions-label {
    font-size: 13px;
    font-weight: 500;
    color: #6B7280;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#foxim-wizard-wrapper .foxim-suggestions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#foxim-wizard-wrapper .foxim-suggestion-badge {
    padding: 10px 16px;
    background: #F9FAFB;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    color: #1D2D44;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    white-space: nowrap;
}

#foxim-wizard-wrapper .foxim-suggestion-badge:hover {
    background: #FEF3E7;
    border-color: #E85D04;
    color: #E85D04;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(232, 93, 4, 0.15);
}

/* === Résultat multimodal (3 colonnes) === */

#foxim-wizard-wrapper .foxim-travel-result {
    background: linear-gradient(135deg, #FEF3E7 0%, #FDEACD 100%);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #E85D04;
}

#foxim-wizard-wrapper .foxim-travel-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(232, 93, 4, 0.2);
}

#foxim-wizard-wrapper .foxim-travel-result-header strong {
    font-size: 16px;
    color: #92400E;
    font-weight: 600;
}

#foxim-wizard-wrapper .foxim-travel-clear {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 4px;
}

#foxim-wizard-wrapper .foxim-travel-clear:hover {
    background: rgba(232, 93, 4, 0.1);
}

#foxim-wizard-wrapper .foxim-travel-clear svg {
    width: 20px;
    height: 20px;
    color: #92400E;
}

/* Grid 3 colonnes */

#foxim-wizard-wrapper .foxim-travel-modes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

#foxim-wizard-wrapper .foxim-travel-mode {
    background: white;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

#foxim-wizard-wrapper .foxim-travel-mode:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

#foxim-wizard-wrapper .foxim-travel-mode-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

#foxim-wizard-wrapper .foxim-travel-mode-label {
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#foxim-wizard-wrapper .foxim-travel-mode-time {
    font-size: 18px;
    color: #E85D04;
    font-weight: 700;
}

/* === Footer avec lien secondaire === */

#foxim-wizard-wrapper .foxim-travel-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
    text-align: center;
}

#foxim-wizard-wrapper .foxim-travel-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6B7280;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

#foxim-wizard-wrapper .foxim-travel-link:hover {
    color: #E85D04;
    background: #FEF3E7;
}

#foxim-wizard-wrapper .foxim-travel-link svg {
    width: 16px;
    height: 16px;
}

/* === Responsive === */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    #foxim-wizard-wrapper #foxim-single-map {
        height: 400px;
    }

    #foxim-wizard-wrapper .foxim-travel-widget {
        padding: 24px;
    }

    #foxim-wizard-wrapper .foxim-suggestions-grid {
        gap: 6px;
    }

    #foxim-wizard-wrapper .foxim-suggestion-badge {
        font-size: 13px;
        padding: 8px 14px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    #foxim-wizard-wrapper .foxim-map-section {
        margin: 24px 0;
    }

    #foxim-wizard-wrapper #foxim-single-map {
        height: 350px;
    }

    #foxim-wizard-wrapper .foxim-travel-widget {
        padding: 20px;
    }

    #foxim-wizard-wrapper .foxim-travel-widget h3 {
        font-size: 18px;
    }

    #foxim-wizard-wrapper .foxim-travel-subtitle {
        font-size: 14px;
    }

    #foxim-wizard-wrapper #foxim-address-search {
        font-size: 14px;
        padding: 12px 16px;
    }

    #foxim-wizard-wrapper .foxim-suggestions-grid {
        flex-direction: column;
        gap: 8px;
    }

    #foxim-wizard-wrapper .foxim-suggestion-badge {
        width: 100%;
        text-align: center;
    }

    #foxim-wizard-wrapper .foxim-travel-modes {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #foxim-wizard-wrapper .foxim-travel-mode {
        padding: 14px;
    }

    #foxim-wizard-wrapper .foxim-travel-mode-icon {
        font-size: 28px;
    }

    #foxim-wizard-wrapper .foxim-travel-mode-time {
        font-size: 16px;
    }

    #foxim-wizard-wrapper .foxim-price-marker-inner {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Small mobile (< 480px) */
@media (max-width: 480px) {
    #foxim-wizard-wrapper #foxim-single-map {
        height: 300px;
    }

    #foxim-wizard-wrapper .foxim-travel-widget {
        padding: 16px;
    }

    #foxim-wizard-wrapper .foxim-travel-widget h3 {
        font-size: 16px;
    }

    #foxim-wizard-wrapper .foxim-travel-subtitle {
        font-size: 13px;
    }
}
