/**
 * Frontend styles for Alpi Météo widgets
 */

/* Base Widget Styles */
.alpi-meteo-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
}

/* Default Template */
.alpi-meteo-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.alpi-meteo-location {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.alpi-meteo-timestamp {
    font-size: 0.85em;
    color: #7f8c8d;
}

.alpi-meteo-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.alpi-meteo-temperature {
    flex: 1;
}

.temperature-value {
    font-size: 3em;
    font-weight: 300;
    color: #2980b9;
    display: block;
    line-height: 1;
}

.temperature-feels-like {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-top: 5px;
    display: block;
}

.alpi-meteo-icon {
    flex: 0 0 auto;
    margin: 0 20px;
}

.alpi-meteo-icon img {
    width: 80px;
    height: 80px;
}

.alpi-meteo-description {
    flex: 1;
    text-align: right;
    font-size: 1.1em;
    color: #34495e;
    text-transform: capitalize;
}

.alpi-meteo-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.alpi-meteo-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.detail-label {
    font-weight: 500;
    color: #7f8c8d;
}

.detail-value {
    font-weight: 600;
    color: #2c3e50;
}

/* Compact Template */
.alpi-meteo-compact {
    max-width: 200px;
    padding: 15px;
    margin: 10px auto;
}

.alpi-meteo-compact-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.compact-icon {
    width: 40px;
    height: 40px;
}

.compact-temperature {
    font-size: 1.5em;
    font-weight: 600;
    color: #2980b9;
}

.compact-location {
    font-size: 0.9em;
    color: #7f8c8d;
}

/* Detailed Template */
.alpi-meteo-detailed {
    max-width: 600px;
    padding: 30px;
}

.alpi-meteo-main-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.alpi-meteo-temperature-section {
    flex: 1;
}

.main-temperature {
    font-size: 4em;
    font-weight: 300;
    color: #2980b9;
    line-height: 1;
    margin-bottom: 10px;
}

.feels-like {
    font-size: 1em;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.description {
    font-size: 1.2em;
    color: #34495e;
    text-transform: capitalize;
}

.alpi-meteo-icon-section img {
    width: 120px;
    height: 120px;
}

.alpi-meteo-detailed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.detail-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.detail-title {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
}

/* Card Template */
.alpi-meteo-card {
    max-width: 300px;
    border: 1px solid #e1e8ed;
}

.card-header {
    background: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #e1e8ed;
}

.card-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.card-body {
    padding: 20px;
}

.card-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.card-temperature {
    font-size: 2.5em;
    font-weight: 300;
    color: #2980b9;
}

.card-icon {
    width: 60px;
    height: 60px;
}

.card-description {
    font-size: 1em;
    color: #34495e;
    margin-bottom: 15px;
    text-transform: capitalize;
}

.card-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #7f8c8d;
}

/* Error Template */
.alpi-meteo-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    text-align: center;
    padding: 20px;
}

.error-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.error-message {
    font-weight: 500;
}

/* Forecast Widget */
.alpi-meteo-forecast {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.forecast-title {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3em;
}

.forecast-items {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
}

.forecast-item {
    flex: 0 0 auto;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    min-width: 100px;
}

.forecast-date {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.forecast-item img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

.forecast-temps {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.temp-max {
    font-weight: 600;
    color: #2c3e50;
}

.temp-min {
    color: #7f8c8d;
}

/* Drag & Drop Widget Styles */
.alpi-meteo{padding:8px;border:1px solid #ddd;border-radius:6px}
.alpi-meteo .alpi-sec{display:flex;gap:8px;margin-bottom:8px}
.alpi-meteo .alpi-col{flex:1;border:1px solid #eee;border-radius:6px;padding:6px}
.alpi-meteo .alpi-block{margin-bottom:6px}

/* Responsive design */
@media (max-width: 768px) {
    .alpi-meteo-widget {
        margin: 10px;
        padding: 15px;
    }
    
    .alpi-meteo-current {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .alpi-meteo-description {
        text-align: center;
    }
    
    .alpi-meteo-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .alpi-meteo-detailed-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .forecast-items {
        gap: 10px;
    }
    
    .forecast-item {
        min-width: 80px;
        padding: 10px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .alpi-meteo-widget {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .alpi-meteo-location,
    .temperature-value,
    .detail-value,
    .main-temperature {
        color: #e2e8f0;
    }
    
    .alpi-meteo-timestamp,
    .temperature-feels-like,
    .detail-label,
    .feels-like {
        color: #a0aec0;
    }
    
    .alpi-meteo-description,
    .description {
        color: #cbd5e0;
    }
    
    .alpi-meteo-header {
        border-bottom-color: #4a5568;
    }
    
    .detail-card {
        background: #4a5568;
    }
    
    .forecast-item {
        background: #4a5568;
    }
    
    .forecast-title {
        color: #e2e8f0;
    }
}

/* Animation Effects */
.alpi-meteo-widget {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.alpi-meteo-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.temperature-value,
.main-temperature,
.card-temperature {
    transition: color 0.3s ease;
}

/* Temperature Color Coding */
.temperature-cold {
    color: #3498db !important;
}

.temperature-mild {
    color: #f39c12 !important;
}

.temperature-hot {
    color: #e74c3c !important;
}
