/* Scootercam Tempest Weather Plugin v3.0 Styles */

/* === Chart Containers === */
.scootercam-tempest-chart-container {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.scootercam-tempest-chart-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
}

.scootercam-tempest-chart-container canvas {
    max-width: 100%;
}

.chart-note {
    text-align: center;
    color: #666;
    font-size: 0.9em;
    margin-top: 15px;
    font-style: italic;
}

/* === Error Messages === */
.scootercam-tempest-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
}

/* === Card Layout (NEW in v3.0) === */
.scootercam-tempest-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    margin: 20px 0;
    overflow: hidden;
    transition: all 0.3s ease;
    color: #fff;
}

.scootercam-tempest-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

.tempest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.tempest-card-header h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #fff;
}

.tempest-card-updated {
    font-size: 0.85em;
    opacity: 0.9;
}

.tempest-card-body {
    padding: 24px;
}

.tempest-card-hero {
    text-align: center;
    padding: 20px 0 30px 0;
}

.tempest-card-temp {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    line-height: 1;
}

.temp-value {
    font-size: 5em;
    font-weight: 700;
}

.temp-unit {
    font-size: 2em;
    font-weight: 400;
    padding-top: 8px;
}

.tempest-card-feels {
    margin-top: 12px;
    font-size: 1.1em;
    opacity: 0.95;
}

.tempest-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.tempest-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.15);
    padding: 16px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.tempest-card-item:hover {
    background: rgba(255,255,255,0.25);
}

.item-icon {
    font-size: 1.8em;
    line-height: 1;
}

.item-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-label {
    font-size: 0.85em;
    opacity: 0.85;
    font-weight: 500;
}

.item-value {
    font-size: 1.1em;
    font-weight: 600;
}

/* === Classic Table Layout (Original) === */
.scootercam-tempest-current {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
    transition: opacity 0.3s ease;
}

.scootercam-tempest-current h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.5em;
}

.tempest-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tempest-main {
    text-align: center;
    padding: 20px;
}

.tempest-temp {
    font-size: 3em;
    font-weight: bold;
    color: #2271b1;
    line-height: 1;
}

.tempest-feels {
    color: #666;
    margin-top: 10px;
    font-size: 1.1em;
}

.tempest-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tempest-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.tempest-row:last-child {
    border-bottom: none;
}

.tempest-row .label {
    font-weight: 600;
    color: #555;
}

.tempest-row .value {
    color: #333;
}

.tempest-updated {
    text-align: right;
    color: #999;
    font-size: 0.9em;
    margin-top: 15px;
    font-style: italic;
}

/* === Forecast Tables === */
.scootercam-tempest-forecast {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
    transition: opacity 0.3s ease;
}

.scootercam-tempest-forecast h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.5em;
}

.tempest-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tempest-forecast-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.tempest-forecast-table thead {
    background: #667eea;
    color: #fff;
}

.tempest-forecast-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
}

.tempest-forecast-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

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

.tempest-forecast-table tbody tr:last-child td {
    border-bottom: none;
}

.tempest-forecast-table .icon {
    font-size: 1.5em;
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
}

.tempest-forecast-table .conditions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tempest-forecast-table .conditions .text {
    font-size: 0.9em;
}

.temp-high {
    color: #d63447;
    font-weight: 600;
}

.temp-low {
    color: #2271b1;
    font-weight: 600;
}

.tempest-forecast-table.hourly {
    min-width: 700px;
    font-size: 0.9em;
}

.tempest-forecast-table.hourly .hour-time {
    font-weight: 600;
    white-space: nowrap;
}

/* === Mobile Responsiveness === */
@media (max-width: 768px) {
    .tempest-grid {
        grid-template-columns: 1fr;
    }
    
    .tempest-main {
        padding: 10px;
    }
    
    .tempest-temp {
        font-size: 2.5em;
    }
    
    /* Card adjustments */
    .tempest-card-temp .temp-value {
        font-size: 4em;
    }
    
    .tempest-card-temp .temp-unit {
        font-size: 1.5em;
    }
    
    .tempest-card-grid {
        grid-template-columns: 1fr;
    }
    
    .tempest-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .scootercam-tempest-current,
    .scootercam-tempest-forecast,
    .scootercam-tempest-card {
        padding: 15px;
    }
    
    .tempest-card-body {
        padding: 16px;
    }
    
    .tempest-forecast-table {
        font-size: 0.85em;
    }
    
    .tempest-forecast-table th,
    .tempest-forecast-table td {
        padding: 8px 6px;
    }
}

@media (max-width: 480px) {
    .tempest-temp {
        font-size: 2em;
    }
    
    .tempest-card-temp .temp-value {
        font-size: 3em;
    }
    
    .tempest-card-temp .temp-unit {
        font-size: 1.2em;
    }
    
    .scootercam-tempest-current h3,
    .scootercam-tempest-forecast h3,
    .tempest-card-header h3 {
        font-size: 1.2em;
    }
    
    .tempest-forecast-table {
        font-size: 0.75em;
    }
    
    .tempest-forecast-table .icon {
        font-size: 1.2em;
        margin-right: 4px;
    }
}

/* === Loading State === */
.scootercam-tempest-current.loading,
.scootercam-tempest-forecast.loading,
.scootercam-tempest-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* === Print Styles === */
@media print {
    .tempest-table-wrapper {
        overflow: visible;
    }
    
    .tempest-forecast-table {
        min-width: auto;
    }
    
    .scootercam-tempest-card {
        background: #667eea;
        color: #fff;
    }
}

/* === Dark Mode Support (Optional) === */
@media (prefers-color-scheme: dark) {
    .scootercam-tempest-current,
    .scootercam-tempest-forecast {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .scootercam-tempest-current h3,
    .scootercam-tempest-forecast h3 {
        color: #fff;
    }
    
    .tempest-row {
        border-bottom-color: #333;
    }
    
    .tempest-row .label {
        color: #aaa;
    }
    
    .tempest-row .value {
        color: #e0e0e0;
    }
    
    .tempest-forecast-table tbody tr:hover {
        background: #222;
    }
    
    .tempest-forecast-table td {
        border-bottom-color: #333;
    }
}
