/* Ecowitt Weather Pro Styles */

/* Estilos generales */
.ecowitt-error {
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
}

/* Datos actuales - Grid */
.ecowitt-current {
    margin: 20px 0;
}

.ecowitt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ecowitt-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.ecowitt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.ecowitt-icon {
    font-size: 3em;
    color: #0073aa;
    display: block;
    margin-bottom: 10px;
}

.ecowitt-card h3 {
    margin: 10px 0;
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ecowitt-value {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
}

.ecowitt-meta {
    font-size: 0.85em;
    color: #888;
    margin: 5px 0 0 0;
}

/* Estadísticas */
.ecowitt-stats {
    margin: 30px 0;
}

.ecowitt-stats-section {
    margin-bottom: 40px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ecowitt-stats-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    color: #0073aa;
}

.ecowitt-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.ecowitt-table th,
.ecowitt-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.ecowitt-table thead th {
    background: #f5f5f5;
    font-weight: bold;
    color: #333;
}

.ecowitt-table tbody tr:hover {
    background: #f9f9f9;
}

.ecowitt-table tbody td:first-child {
    font-weight: 500;
}

/* Gráficas */
.ecowitt-graphs {
    margin: 30px 0;
}

.ecowitt-graph-controls {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.ecowitt-period-btn {
    padding: 10px 20px;
    margin: 0 5px;
    border: 2px solid #0073aa;
    background: #fff;
    color: #0073aa;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
}

.ecowitt-period-btn:hover {
    background: #0073aa;
    color: #fff;
}

.ecowitt-period-btn.active {
    background: #0073aa;
    color: #fff;
}

.ecowitt-graph-container {
    margin-bottom: 40px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ecowitt-graph-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-left: 4px solid #0073aa;
    padding-left: 15px;
}

.ecowitt-graph-container canvas {
    max-width: 100%;
    height: 300px !important;
}

/* Vista completa */
.ecowitt-full {
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .ecowitt-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .ecowitt-card {
        padding: 15px;
    }
    
    .ecowitt-icon {
        font-size: 2em;
    }
    
    .ecowitt-value {
        font-size: 1.5em;
    }
    
    .ecowitt-period-btn {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
    
    .ecowitt-table {
        font-size: 0.9em;
    }
    
    .ecowitt-table th,
    .ecowitt-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .ecowitt-grid {
        grid-template-columns: 1fr;
    }
}

/* Animaciones de carga */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.ecowitt-loading {
    animation: pulse 1.5s infinite;
}

/* Colores según condiciones */
.temp-hot { color: #e74c3c; }
.temp-warm { color: #f39c12; }
.temp-mild { color: #3498db; }
.temp-cold { color: #2980b9; }

.humidity-high { color: #3498db; }
.humidity-low { color: #e67e22; }

.wind-calm { color: #2ecc71; }
.wind-moderate { color: #f39c12; }
.wind-strong { color: #e74c3c; }
