/**
 * MAPBOX ESTILOS CSS
 * Estilos para popups y marcadores
 */

/* ============================================
   MARCADORES
   ============================================ */

.mapbox-marker {
    cursor: pointer;
}

.mapbox-marker:hover {
    filter: brightness(1.1);
}

/* ============================================
   POPUP BASE
   ============================================ */

.mapbox-custom-popup {
    max-width: 320px !important;
    z-index: 9999 !important;
}

.mapbox-custom-popup .mapboxgl-popup-content {
    padding: 0 !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25) !important;
}

/* TEMA FUTURISTA - Contenedor Mapbox negro */
html[data-tema="futurista"] .mapboxgl-popup-content {
    background: #0a0a0a !important;
    border: 1px solid rgba(0, 247, 255, 0.5) !important;
}

html[data-tema="futurista"] .mapboxgl-popup-tip {
    border-top-color: #0a0a0a !important;
    border-bottom-color: #0a0a0a !important;
}

.mapbox-custom-popup .mapboxgl-popup-close-button {
    font-size: 20px;
    color: white;
    right: 8px;
    top: 8px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    z-index: 10;
}

.mapbox-custom-popup .mapboxgl-popup-tip {
    border-top-color: white !important;
}

/* FUTURISTA - Flecha negra */
html[data-tema="futurista"] .mapbox-custom-popup .mapboxgl-popup-tip {
    border-top-color: #0a0a0a !important;
}

/* ============================================
   CONTENIDO DEL POPUP
   ============================================ */

.mapbox-popup-content {
    font-family: 'Inter', sans-serif;
    width: 320px;
    max-width: 320px;
}

.mapbox-popup-header {
    background: linear-gradient(135deg, #1e90ff, #4169e1);
    color: white;
    padding: 12px 15px;
}

.mapbox-popup-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.mapbox-popup-type {
    font-size: 0.75rem;
    opacity: 0.9;
}

.mapbox-popup-image {
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: #f0f0f0;
}

.mapbox-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mapbox-popup-body {
    padding: 12px 15px;
    background: white;
}

.mapbox-popup-address {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.mapbox-popup-address i {
    color: #1e90ff;
    margin-right: 6px;
}

.mapbox-popup-price {
    background: rgba(30, 144, 255, 0.1);
    border: 1px solid rgba(30, 144, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    margin-bottom: 12px;
}

.mapbox-popup-price-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e90ff;
}

.mapbox-popup-deposit {
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    margin-bottom: 12px;
}

.mapbox-popup-actions {
    display: flex;
    gap: 8px;
}

.mapbox-popup-btn {
    flex: 1;
    padding: 10px 15px;
    border-radius: 20px;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.mapbox-popup-btn.primary {
    background: linear-gradient(135deg, #1e90ff, #4169e1);
    color: white;
}

/* ============================================
   TEMA FUTURISTA - POPUP MAPBOX
   ============================================ */

html[data-tema="futurista"] .mapbox-custom-popup .mapbox-popup-header,
html[data-tema="futurista"] .mapbox-popup-header {
    background: #0a0a0a !important;
    border-bottom: 1px solid rgba(0, 247, 255, 0.4) !important;
}

html[data-tema="futurista"] .mapbox-custom-popup .mapbox-popup-title,
html[data-tema="futurista"] .mapbox-popup-title {
    color: #00f7ff !important;
    text-shadow: 0 0 8px rgba(0, 247, 255, 0.5) !important;
}

html[data-tema="futurista"] .mapbox-custom-popup .mapbox-popup-type,
html[data-tema="futurista"] .mapbox-popup-type {
    color: #00f7ff !important;
    text-shadow: 0 0 6px rgba(0, 247, 255, 0.4) !important;
    opacity: 1 !important;
}

html[data-tema="futurista"] .mapbox-custom-popup .mapbox-popup-body,
html[data-tema="futurista"] .mapbox-popup-body {
    background: #0a0a0a !important;
}

html[data-tema="futurista"] .mapbox-custom-popup .mapbox-popup-address,
html[data-tema="futurista"] .mapbox-popup-address {
    color: #ffffff !important;
}

html[data-tema="futurista"] .mapbox-custom-popup .mapbox-popup-address i,
html[data-tema="futurista"] .mapbox-popup-address i {
    color: #00f7ff !important;
    text-shadow: 0 0 8px rgba(0, 247, 255, 0.5) !important;
}

html[data-tema="futurista"] .mapbox-custom-popup .mapbox-popup-price,
html[data-tema="futurista"] .mapbox-popup-price {
    background: #0a0a0a !important;
    border: 1px solid rgba(0, 247, 255, 0.4) !important;
}

html[data-tema="futurista"] .mapbox-custom-popup .mapbox-popup-price-amount,
html[data-tema="futurista"] .mapbox-popup-price-amount {
    color: #00f7ff !important;
    text-shadow: 0 0 10px rgba(0, 247, 255, 0.5) !important;
}

html[data-tema="futurista"] .mapbox-custom-popup .mapbox-popup-deposit,
html[data-tema="futurista"] .mapbox-popup-deposit {
    color: #00f7ff !important;
    text-shadow: 0 0 8px rgba(0, 247, 255, 0.4) !important;
}

html[data-tema="futurista"] .mapbox-custom-popup .mapbox-popup-btn.primary,
html[data-tema="futurista"] .mapbox-popup-btn.primary {
    background: transparent !important;
    border: 1px solid #00f7ff !important;
    color: #00f7ff !important;
    text-shadow: 0 0 6px rgba(0, 247, 255, 0.4) !important;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.3) !important;
}

html[data-tema="futurista"] .mapbox-custom-popup .mapbox-popup-btn.primary:hover,
html[data-tema="futurista"] .mapbox-popup-btn.primary:hover {
    background: rgba(0, 247, 255, 0.1) !important;
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.5) !important;
}

/* ============================================
   CONTROLES DEL MAPA
   ============================================ */

.mapboxgl-ctrl-group {
    border-radius: 8px !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .mapbox-popup-content {
        width: 280px;
    }
    .mapbox-popup-image {
        height: 140px;
    }
}

/* ============================================
   POPUP CORREDOR
   ============================================ */

.corredor-mapbox-popup .mapboxgl-popup-content {
    padding: 0 !important;
    border-radius: 12px !important;
}

.corredor-mapbox-popup .mapboxgl-popup-tip {
    border-top-color: white !important;
}
