/* ==========================================================================
   SPOTS DE SURF - Costa Oeste S&R
   ========================================================================== */

/* Mapa interactivo */
.map-container {
    margin-bottom: 30px;
}

.map-legend {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #ECE4D3;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin-right: 8px;
    flex-shrink: 0;
}

.legend-dot.tarifa { background: #4CAF50; }
.legend-dot.barbate { background: #8BC34A; }
.legend-dot.conil { background: #FFC107; }
.legend-dot.chiclana { background: #FF9800; }
.legend-dot.norte { background: #2196F3; }

.legend-item.clickable {
    cursor: pointer;
    display: inline-block;
    position: relative;
    padding: 1.4em 2.4em;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.2;
    border: 2px solid #585858;
    background: #fff;
    color: #585858;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: 0;
    box-shadow: none;
    font-family: 'Open Sans', sans-serif;
}

.legend-item.clickable:hover {
    color: #C9B69B;
    border-color: #C9B69B;
    background: #fff;
    transform: none;
    box-shadow: none;
}

.legend-item.clickable:active {
    background-color: #fafafa;
    transform: none;
}

/* Estilo para marcadores de Leaflet */
.surf-marker {
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

/* Tooltip para hover en spots */
.spot-tooltip .mapboxgl-popup-content {
    background: transparent;
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    border: none;
    box-shadow: none;
    padding: 0;
}

.spot-tooltip .mapboxgl-popup-tip {
    display: none;
}

.surf-popup {
    min-width: 280px;
}

.surf-popup h4 {
    margin: 0 0 10px 0;
    color: #AB977A;
    font-size: 16px;
    font-weight: 700;
}

.surf-popup .municipality {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-bottom: 10px;
}

/* Contenedor principal de spots */
.spots-container {
    margin-bottom: 40px;
}

/* Zonas de spots */
.spots-zone {
    margin-bottom: 40px;
}

.zone-title {
    color: #AB977A;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ECE4D3;
}

/* Grid de spots pequeños */
.spots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Tarjeta de spot pequeña */
.surf-card.small {
    background: #fff;
    border: 2px solid #ECE4D3;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.surf-card.small:hover {
    border-color: #AB977A;
    box-shadow: 0 4px 12px rgba(171, 151, 122, 0.2);
    transform: translateY(-2px);
}

.surf-card.small.active {
    border-color: #AB977A;
    background: #fefefe;
    box-shadow: 0 4px 12px rgba(171, 151, 122, 0.3);
}

/* Header de tarjeta pequeña */
.surf-card.small .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.surf-card.small .spot-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.surf-card.small .municipality {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.surf-card.small .status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Estados del indicador */
.status-indicator[data-status="excellent"] { background: #4CAF50; }
.status-indicator[data-status="good"] { background: #8BC34A; }
.status-indicator[data-status="fair"] { background: #FFC107; }
.status-indicator[data-status="poor"] { background: #FF9800; }
.status-indicator[data-status="flat"] { background: #9E9E9E; }

/* Datos principales en tarjeta pequeña */
.surf-card.small .surf-data {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.surf-card.small .wave-info {
    text-align: center;
}

.surf-card.small .wave-height .value {
    font-size: 20px;
    font-weight: 700;
    color: #AB977A;
}

.surf-card.small .wave-height .unit {
    font-size: 14px;
    color: #666;
    margin-left: 2px;
}

.surf-card.small .wave-height label {
    display: block;
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.surf-card.small .wind-speed {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.surf-card.small .rating .stars {
    color: #FFC107;
    font-size: 14px;
}

/* Contenedor del spot detallado */
.spot-detail-container {
    background: #fff;
    border: 2px solid #ECE4D3;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}

.spot-detail-container h3 {
    color: #AB977A;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-align: center;
}

/* Tarjeta de spot grande (detallada) */
.surf-card.large {
    background: #fff;
    border: 2px solid #AB977A;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 6px 20px rgba(171, 151, 122, 0.15);
}

/* Header de tarjeta grande */
.surf-card.large .card-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ECE4D3;
}

.surf-card.large .spot-name {
    font-size: 28px;
    font-weight: 700;
    color: #AB977A;
    margin: 0 0 5px 0;
}

.surf-card.large .municipality {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.surf-card.large .status-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin: 10px auto;
    display: block;
}

/* Datos principales en tarjeta grande */
.surf-card.large .surf-data {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.surf-card.large .wave-info,
.surf-card.large .wind-info,
.surf-card.large .tide-info {
    text-align: center;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #ECE4D3;
}

.surf-card.large .wave-height,
.surf-card.large .wave-period,
.surf-card.large .wind-speed,
.surf-card.large .wind-direction,
.surf-card.large .tide-height,
.surf-card.large .tide-time {
    margin-bottom: 10px;
}

.surf-card.large .value {
    font-size: 24px;
    font-weight: 700;
    color: #AB977A;
    display: block;
}

.surf-card.large .unit {
    font-size: 16px;
    color: #666;
    margin-left: 3px;
}

.surf-card.large label {
    display: block;
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
    font-weight: 600;
}

/* Condiciones y recomendaciones */
.surf-card.large .conditions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.surf-card.large .rating {
    text-align: center;
}

.surf-card.large .rating .stars {
    color: #FFC107;
    font-size: 18px;
    margin-bottom: 5px;
    display: block;
}

.surf-card.large .rating-text {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.surf-card.large .recommendations {
    display: flex;
    gap: 10px;
    align-items: center;
}

.surf-card.large .level-badge {
    background: #AB977A;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.surf-card.large .level-badge[data-level="beginner"] { background: #4CAF50; }
.surf-card.large .level-badge[data-level="intermediate"] { background: #FF9800; }
.surf-card.large .level-badge[data-level="advanced"] { background: #F44336; }

.surf-card.large .equipment {
    font-size: 12px;
    color: #666;
    background: #ECE4D3;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Peligros y alertas */
.surf-card.large .warnings {
    margin-bottom: 15px;
}

.surf-card.large .warnings[data-danger-level="low"] { border-left: 4px solid #4CAF50; }
.surf-card.large .warnings[data-danger-level="medium"] { border-left: 4px solid #FF9800; }
.surf-card.large .warnings[data-danger-level="high"] { border-left: 4px solid #F44336; }

.surf-card.large .warning-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff3cd;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
}

.surf-card.large .warning-item .icon-current::before {
    content: "⚠️";
    font-size: 14px;
}

/* Horario de actualización */
.surf-card.large .update-time {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #ECE4D3;
    font-size: 12px;
    color: #999;
}

/* Webcam buttons hover effect */
.webcam-button {
    background: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.webcam-button:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

/* Webcam section styling */
.webcam-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ECE4D3;
}

.webcam-section h5 {
    color: #AB977A;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
}

.webcam-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .spots-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .surf-card.large .surf-data {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .surf-card.large .conditions {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .surf-card.large .recommendations {
        justify-content: center;
    }

    .webcam-buttons {
        justify-content: center;
    }

    /* Zone buttons - Stack vertically on mobile */
    .map-legend {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    .legend-item.clickable {
        width: 100%;
        padding: 1em 1.5em;
        font-size: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .surf-card.small,
    .surf-card.large {
        padding: 15px;
    }

    .spot-detail-container {
        padding: 15px;
        margin-top: 20px;
    }

    /* Make zone buttons even smaller on very small screens */
    .legend-item.clickable {
        padding: 0.8em 1.2em;
        font-size: 9px;
    }
}