/**
 * Swiss Weather Integration Frontend Styles
 * Beautiful, modern weather displays for outdoor events
 */

/* Weather Widget Base Styles */
.swi-weather-widget,
.swi-compact-weather-widget,
.swi-detailed-weather-widget,
.swi-hero-weather-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border-radius: 12px;
    margin: 20px 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Event Weather Widget */
.swi-event-weather-widget {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    color: white;
    box-shadow: 0 8px 32px rgba(79, 172, 254, 0.3);
}

.swi-weather-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.swi-weather-icon {
    font-size: 3rem;
    margin-right: 15px;
}

.swi-weather-main {
    flex: 1;
    min-width: 150px;
}

.swi-temperature {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.swi-condition {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 500;
}

.swi-weather-location {
    text-align: right;
    opacity: 0.8;
    font-size: 0.9rem;
}

.swi-data-source {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    opacity: 0.7;
    font-style: italic;
}

/* Weather Recommendations */
.swi-weather-recommendations {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.swi-weather-recommendations h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

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

.swi-recommendation {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 0.9rem;
}

.swi-rec-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.swi-rec-perfect {
    background: rgba(46, 213, 115, 0.3);
    border-left: 3px solid #2ed573;
}

.swi-rec-clothing,
.swi-rec-equipment {
    background: rgba(255, 193, 7, 0.3);
    border-left: 3px solid #ffc107;
}

.swi-rec-alternative {
    background: rgba(255, 107, 107, 0.3);
    border-left: 3px solid #ff6b6b;
}

/* Weather Details */
.swi-weather-details {
    margin-top: 15px;
}

.swi-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.swi-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.swi-detail-icon {
    font-size: 1.1rem;
}

.swi-detail-label {
    opacity: 0.8;
}

.swi-detail-value {
    font-weight: 600;
    margin-left: auto;
}

/* Compact Weather Widget */
.swi-compact-weather-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
}

.swi-compact-weather {
    display: flex;
    align-items: center;
    gap: 15px;
}

.swi-compact-weather .swi-weather-icon {
    font-size: 2rem;
    margin: 0;
}

.swi-compact-weather .swi-temperature {
    font-size: 1.8rem;
    font-weight: 700;
}

.swi-compact-details {
    text-align: right;
    font-size: 0.9rem;
    opacity: 0.9;
}

.swi-precipitation {
    color: #e8f4fd;
    margin-top: 5px;
}

/* Detailed Weather Widget */
.swi-detailed-weather-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    min-height: 250px;
}

.swi-weather-header .swi-main-weather {
    display: flex;
    align-items: center;
    gap: 20px;
}

.swi-weather-icon-large {
    font-size: 4rem;
}

.swi-main-temp {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
}

.swi-weather-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.swi-weather-info p {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.swi-weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.swi-weather-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.swi-weather-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 8px;
}

.swi-weather-value {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.swi-icon {
    font-size: 1.3rem;
}

/* Recommendations Section */
.swi-recommendations-section h4 {
    margin: 20px 0 15px 0;
    font-size: 1.2rem;
}

.swi-recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.swi-recommendation-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* Hero Weather Widget */
.swi-hero-weather-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.swi-hero-weather-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.swi-hero-weather-content {
    position: relative;
    z-index: 1;
}

.swi-hero-icon {
    font-size: 5rem;
    margin-bottom: 15px;
}

.swi-hero-temp {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1;
}

.swi-hero-description {
    font-size: 1.3rem;
    margin-bottom: 10px;
    opacity: 0.95;
}

.swi-hero-location {
    font-size: 1.1rem;
    opacity: 0.8;
}

.swi-perfect-weather {
    background: linear-gradient(135deg, #2ed573 0%, #17a085 100%);
}

.swi-hero-cta {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

/* Forecast Widgets */
.swi-horizontal-forecast-widget,
.swi-cards-forecast-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.swi-horizontal-forecast-widget h4,
.swi-cards-forecast-widget h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.swi-forecast-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.swi-forecast-day {
    flex: 0 0 120px;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    color: #2c3e50;
}

.swi-forecast-date {
    margin-bottom: 10px;
}

.swi-forecast-date strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
}

.swi-forecast-date small {
    font-size: 0.8rem;
    opacity: 0.7;
}

.swi-forecast-icon {
    font-size: 2.5rem;
    margin: 10px 0;
}

.swi-forecast-temps {
    margin: 10px 0;
}

.swi-temp-high {
    font-weight: 700;
    font-size: 1.1rem;
}

.swi-temp-low {
    opacity: 0.7;
    margin-left: 5px;
}

.swi-forecast-precip {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Cards Forecast */
.swi-forecast-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.swi-forecast-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 20px;
    color: #2c3e50;
}

.swi-card-header h5 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.swi-card-header small {
    opacity: 0.7;
}

.swi-card-weather {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 15px 0;
}

.swi-card-icon {
    font-size: 2.5rem;
}

.swi-temp-range {
    font-size: 1.2rem;
    font-weight: 600;
}

.swi-card-details {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Weather Events List */
.swi-weather-events-list {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.swi-layout-card .swi-weather-events-list {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.swi-event-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.swi-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.swi-event-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.swi-event-header h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.swi-event-header h3 a:hover {
    color: #667eea;
}

.swi-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #6c757d;
}

.swi-event-weather {
    margin: 15px 0;
}

.swi-event-content {
    margin: 15px 0;
    line-height: 1.6;
    color: #495057;
}

/* Weather Score */
.swi-weather-score {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    font-size: 0.9rem;
}

.swi-score-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.swi-score-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b 0%, #ffc107 50%, #2ed573 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.swi-score-text {
    font-weight: 600;
    color: #495057;
}

.swi-event-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.swi-event-link {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: transform 0.2s ease;
}

.swi-event-link:hover {
    transform: translateY(-1px);
    color: white;
}

/* Perfect Weather Events */
.swi-perfect-weather-header {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #2ed573 0%, #17a085 100%);
    color: white;
    border-radius: 12px;
}

.swi-perfect-weather-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}

.swi-no-perfect-weather {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* Weather Alerts */
.swi-weather-alerts-list {
    margin: 20px 0;
}

.swi-weather-alert {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid;
}

.swi-alert-warning {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.swi-alert-info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

.swi-alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.swi-alert-content h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.swi-alert-content h4 a {
    color: inherit;
    text-decoration: none;
}

.swi-alert-message {
    margin: 0 0 8px 0;
    font-weight: 500;
}

.swi-alert-meta {
    opacity: 0.8;
    font-size: 0.85rem;
}

/* Weather Filters */
.swi-weather-filters {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.swi-weather-filters h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.swi-weather-filter {
    display: inline-block;
    margin: 5px 10px 5px 0;
    padding: 8px 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.swi-weather-filter:hover {
    border-color: #667eea;
    color: #667eea;
}

.swi-weather-filter.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Weather Placeholder Styles */
.swi-weather-placeholder {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.swi-placeholder-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.swi-placeholder-message {
    font-size: 1rem;
    opacity: 0.9;
}

.swi-weather-info {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.swi-forecast-info {
    margin: 0 0 15px 0;
    line-height: 1.5;
    opacity: 0.95;
}

.swi-seasonal-info {
    margin-top: 20px;
}

.swi-seasonal-info h4 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    color: #ffc107;
}

.swi-seasonal-info ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.swi-seasonal-info li {
    margin: 8px 0;
    padding: 6px 0;
    opacity: 0.9;
    line-height: 1.4;
}

/* Future event specific styling */
.swi-weather-placeholder.swi-future-event {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.swi-weather-placeholder.swi-future-event .swi-seasonal-info h4 {
    color: #ffeaa7;
}

/* Past event specific styling */
.swi-weather-placeholder.swi-past-event {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    opacity: 0.8;
}

/* No Data Message */
.swi-no-data {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .swi-weather-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .swi-weather-location {
        text-align: center;
    }
    
    .swi-detail-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .swi-recommendations-grid {
        grid-template-columns: 1fr;
    }
    
    .swi-forecast-scroll {
        gap: 15px;
    }
    
    .swi-forecast-day {
        flex: 0 0 100px;
        padding: 10px;
    }
    
    .swi-forecast-cards {
        grid-template-columns: 1fr;
    }
    
    .swi-event-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .swi-hero-temp {
        font-size: 3rem;
    }
    
    .swi-hero-icon {
        font-size: 4rem;
    }
    
    .swi-weather-filters {
        text-align: center;
    }
    
    .swi-weather-filter {
        margin: 5px;
    }
    
    .swi-placeholder-title {
        font-size: 1.1rem;
    }
    
    .swi-seasonal-info ul {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .swi-event-weather-widget,
    .swi-detailed-weather-widget,
    .swi-hero-weather-widget {
        padding: 15px;
    }
    
    .swi-temperature,
    .swi-main-temp {
        font-size: 2rem;
    }
    
    .swi-hero-temp {
        font-size: 2.5rem;
    }
    
    .swi-weather-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .swi-compact-weather {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .swi-compact-details {
        text-align: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .swi-forecast-day,
    .swi-forecast-card {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: #ecf0f1;
    }
    
    .swi-event-card {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .swi-event-header h3 a {
        color: #ecf0f1;
    }
    
    .swi-event-header h3 a:hover {
        color: #667eea;
    }
    
    .swi-weather-filters {
        background: #34495e;
    }
    
    .swi-weather-filter {
        background: #2c3e50;
        border-color: #495057;
        color: #ecf0f1;
    }
}
