/**
 * Solar Dashboard Styles
 * Author: EnergyON Dev Theme
 */

.solar-dashboard {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.solar-title {
    color: #2c3e50;
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
}

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

.solar-metric {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.solar-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.metric-label {
    display: block;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    display: block;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.solar-timestamp {
    color: #6c757d;
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}

/* Error states */
.solar-data-error,
.solar-power-error,
.solar-battery-error,
.solar-energy-error {
    color: #dc3545;
    font-weight: 500;
}

/* Individual metric styles */
.solar-power {
    color: #28a745;
    font-weight: 600;
}

.solar-battery {
    color: #007bff;
    font-weight: 600;
}

.solar-energy {
    color: #ffc107;
    font-weight: 600;
}

/* Style variations */
.solar-style-minimal .solar-metrics {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.solar-style-minimal .solar-metric {
    padding: 10px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.solar-style-minimal .metric-value {
    font-size: 20px;
}

.solar-style-cards .solar-metrics {
    grid-template-columns: repeat(2, 1fr);
}

.solar-style-cards .solar-metric {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.solar-style-cards .metric-label {
    color: rgba(255,255,255,0.8);
}

.solar-style-cards .metric-value {
    color: white;
}

/* Responsive design */
@media (max-width: 768px) {
    .solar-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .solar-metric {
        padding: 12px;
    }
    
    .metric-value {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .solar-metrics {
        grid-template-columns: 1fr;
    }
    
    .solar-dashboard {
        padding: 15px;
    }
}

/* Animation for data updates */
@keyframes dataUpdate {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.solar-metric.updating {
    animation: dataUpdate 1s ease-in-out;
}

/* Status indicators */
.solar-status-online {
    color: #28a745;
}

.solar-status-offline {
    color: #dc3545;
}

.solar-status-simulation {
    color: #ffc107;
}

/* Login prompt styles */
.solar-login-prompt {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: white;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.solar-login-content h3 {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 600;
}

.solar-login-content p {
    margin: 0 0 25px 0;
    font-size: 16px;
    opacity: 0.9;
}

.solar-login-button {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.solar-login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    color: #5a6fd8;
    text-decoration: none;
}

.solar-login-note {
    margin-top: 20px !important;
    font-size: 14px;
    opacity: 0.8;
}

.solar-login-note a {
    color: white;
    text-decoration: underline;
}

.solar-login-note a:hover {
    text-decoration: none;
}

/* Error states for login required */
.solar-power-error,
.solar-battery-error,
.solar-energy-error {
    color: #dc3545;
    font-weight: 500;
    font-style: italic;
}
