/**
 * Seasonal Climate Widget Styles - Widget Climático Estacional
 * Estilos para el widget de información climática estacional para peregrinos
 *
 * @package Xacobeos
 */

.climate-widget-seasonal {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.climate-widget-seasonal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d5102b, #ffd002, #4ade80, #3b82f6);
    border-radius: 16px 16px 0 0;
}

/* === TÍTULO PRINCIPAL === */
.climate-main-title {
    margin-bottom: 20px;
    padding-top: 4px;
    text-align: center;
}

.climate-main-title h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.climate-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

/* === SECCIÓN MEJORES MESES === */
.best-months-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
    letter-spacing: 0.03em;
}

.best-months-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
}

.best-month-card {
    background: white;
    border: 2px solid #f1f5f9;
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    min-width: 0;
    box-sizing: border-box;
}

.best-month-card.rank-1 {
    border-color: #ffd002;
    background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.best-month-card.rank-2 {
    border-color: #e5e7eb;
    background: linear-gradient(135deg, #f9fafb, #ffffff);
}

.best-month-card.rank-3 {
    border-color: #d97706;
    background: linear-gradient(135deg, #fef3c7, #ffffff);
}

.month-rank {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #d5102b;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.best-month-card.rank-1 .month-rank {
    background: #ffd002;
    color: #1f2937;
}

.best-month-card.rank-2 .month-rank {
    background: #9ca3af;
}

.best-month-card.rank-3 .month-rank {
    background: #d97706;
}

.month-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.month-temps {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-bottom: 6px;
}

.temp-max {
    font-size: 0.9rem;
    font-weight: 700;
    color: #dc2626;
}

.temp-min {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2563eb;
}

.month-rain {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.month-rain i {
    color: #3b82f6;
    font-size: 0.7rem;
}

/* === DATOS MENSUALES === */
.monthly-data-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    overflow: visible;
    min-height: 180px;
}

/* === LEYENDA === */
.climate-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.temp-max-color {
    background-color: #dc2626;
}

.temp-min-color {
    background-color: #2563eb;
}

.legend-icon {
    color: #3b82f6;
    font-size: 0.75rem;
}

.legend-text {
    font-size: 0.65rem;
    color: #64748b;
    font-weight: 500;
}

.monthly-scroll {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3px;
    padding-bottom: 4px;
    width: 100%;
    overflow: hidden;
}

.monthly-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    padding: 6px 2px;
    text-align: center;
    transition: all 0.2s ease;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    box-sizing: border-box;
}

.monthly-card:hover {
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.month-header .month-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.month-temps {
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.temp-max, .temp-min {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.temp-value {
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.temp-max .temp-value {
    color: #dc2626;
}

.temp-min .temp-value {
    color: #2563eb;
}

.temp-label {
    font-size: 0.6rem;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.month-precipitation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.precip-icon {
    color: #3b82f6;
    font-size: 0.7rem;
}

.precip-data {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.precip-days {
    font-size: 0.7rem;
    font-weight: 600;
    color: #3b82f6;
    line-height: 1;
}

.precip-label {
    font-size: 0.6rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1;
}

/* === RECOMENDACIONES ESTACIONALES === */
.seasonal-recommendations {
    margin-bottom: 20px;
}

.seasons-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.season-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.season-card:hover {
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.season-card.expanded {
    border-color: #d5102b;
}

.season-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.season-header:hover {
    background-color: #f8fafc;
}

.season-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.season-icon {
    font-size: 1.25rem;
}

.season-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.season-temps {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    margin-left: auto;
    margin-right: 12px;
}

.season-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.toggle-icon {
    color: #9ca3af;
    transition: transform 0.3s ease;
}

.season-content {
    padding: 0 16px 16px;
    border-top: 1px solid #f1f5f9;
    background-color: #fafbfc;
}

.season-stats {
    margin-bottom: 12px;
    padding-top: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    margin-bottom: 4px;
}

.stat-label {
    color: #64748b;
    font-weight: 500;
}

.stat-value {
    color: #374151;
    font-weight: 600;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recommendation-item {
    font-size: 0.75rem;
    line-height: 1.4;
    color: #374151;
}

.recommendation-item strong {
    color: #1f2937;
    font-weight: 600;
}

/* === FOOTER === */
.climate-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    text-align: center;
}

.data-source {
    margin-bottom: 6px;
}

.data-source span {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-period {
    margin-bottom: 4px;
}

.data-period span {
    font-size: 0.6rem;
    color: #9ca3af;
    font-weight: 400;
    line-height: 1.3;
    display: block;
    max-width: 100%;
}

.data-years span {
    font-size: 0.65rem;
    color: #9ca3af;
    font-weight: 400;
    font-style: italic;
}

/* === RESPONSIVE === */
/* Sidebar estrecho */
@media (max-width: 1200px) {
    .climate-widget-seasonal {
        padding: 10px;
    }
    
    .best-months-grid {
        gap: 3px;
    }
    
    .best-month-card {
        padding: 6px 3px;
    }
    
    .monthly-scroll {
        grid-template-columns: repeat(4, 1fr);
        gap: 2px;
    }
    
    .monthly-card {
        padding: 4px 1px;
        min-height: 60px;
    }
    
    .month-header .month-name {
        font-size: 0.6rem;
    }
    
    .temp-value {
        font-size: 0.65rem;
    }
    
    .climate-legend {
        gap: 8px;
        padding: 6px;
    }
    
    .legend-text {
        font-size: 0.6rem;
    }
}

@media (max-width: 768px) {
    .climate-widget-seasonal {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .best-months-grid {
        gap: 4px;
    }
    
    .best-month-card {
        padding: 8px 4px;
    }
    
    .monthly-scroll {
        grid-template-columns: repeat(3, 1fr);
        gap: 3px;
    }
    
    .monthly-card {
        padding: 5px 2px;
        min-height: 65px;
    }
    
    .season-header {
        padding: 12px;
    }
    
    .season-info {
        gap: 8px;
    }
    
    .season-content {
        padding: 0 12px 12px;
    }
}

@media (max-width: 480px) {
    .climate-widget-seasonal {
        padding: 12px;
    }
    
    .climate-main-title h3 {
        font-size: 1.2rem;
    }
    
    .best-months-grid {
        gap: 6px;
    }
    
    .monthly-scroll {
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
        min-height: 300px;
    }
    
    .monthly-card {
        padding: 6px 3px;
        min-height: 65px;
    }
    
    .season-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .season-temps {
        margin: 0;
    }
    
    .recommendation-item {
        font-size: 0.7rem;
    }
}
