/* CFA Fire Forecast Plugin Styles */

.cfa-fire-forecast-container {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.4;
    margin: 20px 0;
    background-color: #ffffff;
    color: #333;
}

.cfa-header {
    background-color: #003366;
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
}

.cfa-header-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.cfa-header h2 {
    margin: 0;
    font-size: 1.8em;
    font-weight: normal;
}

.cfa-header p {
    margin: 5px 0 0 0;
    font-size: 1.1em;
    opacity: 0.9;
}

.cfa-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.cfa-info-links {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.cfa-info-links h3 {
    margin: 0 0 10px 0;
    color: #0c5460;
    font-size: 1.1em;
}

.cfa-info-links a {
    color: #0c5460;
    text-decoration: none;
    margin-right: 20px;
    font-weight: bold;
}

.cfa-info-links a:hover {
    text-decoration: underline;
}

.cfa-status-bar {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.cfa-status-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
    font-size: 0.9em;
}

.cfa-status-icon {
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border-radius: 50%;
}

.cfa-status-icon.online { background-color: #28a745; }
.cfa-status-icon.loading { background-color: #ffc107; }
.cfa-status-icon.error { background-color: #dc3545; }

.cfa-forecast-section {
    background: #f8f8f8;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    padding: 0;
}

.cfa-forecast-header {
    background: #e6e6e6;
    border-bottom: 1px solid #ddd;
    padding: 12px 15px;
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
}

.cfa-forecast-content {
    padding: 15px;
}

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

.cfa-forecast-day {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cfa-forecast-day:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.cfa-forecast-day.today {
    border-color: #003366;
    border-width: 3px;
}

.cfa-day-header {
    font-size: 1.1em;
    font-weight: bold;
    color: #003366;
    margin-bottom: 5px;
}

.cfa-day-date {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.cfa-fire-danger-badge {
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.cfa-total-fire-ban {
    background: #dc3545;
    color: white;
    padding: 8px;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 10px;
    font-size: 0.9em;
}

.cfa-district-name {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
}

/* Fire Danger Rating Colors */
.rating-no-rating { 
    background-color: #e9ecef; 
    color: #495057;
}

.rating-low-moderate { 
    background-color: #28a745; 
    color: white;
}

.rating-moderate { 
    background-color: #ffc107; 
    color: #212529;
}

.rating-high { 
    background-color: #fd7e14; 
    color: white;
}

.rating-extreme { 
    background-color: #dc3545; 
    color: white;
}

.rating-catastrophic {
    background-color: #6f2c91;
    color: white;
}

.rating-error {
    background-color: #6c757d;
    color: white;
}

.cfa-fire-danger-scale {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    text-align: center;
}

.cfa-fire-danger-scale h3 {
    color: #003366;
    margin-bottom: 15px;
}

.cfa-fire-danger-scale img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cfa-scale-fallback {
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
    text-align: left;
}

.cfa-emergency-notice {
    background: #f8d7da;
    border: 2px solid #dc3545;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    color: #721c24;
}

.cfa-source-footer {
    background: #f8f9fa;
    border-top: 2px solid #003366;
    padding: 20px;
    margin-top: 30px;
    text-align: center;
    font-size: 0.9em;
}

.cfa-source-footer a {
    color: #003366;
    text-decoration: none;
    font-weight: bold;
}

.cfa-source-footer a:hover {
    text-decoration: underline;
}

.cfa-refresh-btn {
    background-color: #003366;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
    margin: 5px 0;
}

.cfa-refresh-btn:hover {
    background-color: #004080;
}

.cfa-refresh-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.cfa-fire-forecast-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cfa-container {
        padding: 10px;
    }
    
    .cfa-header h2 {
        font-size: 1.5em;
    }
    
    .cfa-status-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cfa-forecast-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .cfa-forecast-day {
        padding: 15px;
    }
    
    .cfa-fire-danger-badge {
        font-size: 1em;
        padding: 10px;
    }
    
    .cfa-info-links a {
        display: block;
        margin: 5px 0;
    }
    
    /* Multi-district table responsive */
    .cfa-multi-district-table {
        overflow-x: auto;
    }
    
    .cfa-forecast-table th,
    .cfa-forecast-table td {
        padding: 8px;
        font-size: 0.9em;
    }
    
    .cfa-fire-danger-badge {
        font-size: 0.8em;
        padding: 6px;
    }
    
    .cfa-total-fire-ban-small {
        font-size: 0.7em;
        padding: 3px 6px;
    }
    
    .day-name {
        font-size: 0.8em;
    }
    
    .day-date {
        font-size: 0.7em;
    }
}

/* Multi-District Table Styles */
.cfa-multi-district .cfa-container {
    max-width: 1200px;
}

.cfa-multi-district-table {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cfa-forecast-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95em;
}

.cfa-forecast-table thead {
    background: #003366;
    color: white;
}

.cfa-forecast-table th {
    padding: 15px 10px;
    text-align: center;
    font-weight: bold;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.cfa-forecast-table th:last-child {
    border-right: none;
}

.cfa-forecast-table th.district-header {
    background: #001a33;
    min-width: 180px;
    text-align: left;
}

.cfa-forecast-table th.today {
    background: #004080;
    position: relative;
}

.cfa-forecast-table th.today::after {
    content: "TODAY";
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ffc107;
    color: #000;
    font-size: 0.7em;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: bold;
}

.day-name {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
}

.day-date {
    font-size: 0.9em;
    opacity: 0.9;
}

.cfa-forecast-table tbody tr {
    border-bottom: 1px solid #ddd;
}

.cfa-forecast-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.cfa-forecast-table tbody tr:hover {
    background: #e9ecef;
}

.cfa-forecast-table td {
    padding: 15px 10px;
    text-align: center;
    border-right: 1px solid #ddd;
    vertical-align: middle;
}

.cfa-forecast-table td:last-child {
    border-right: none;
}

.cfa-forecast-table td.district-name {
    background: #f8f9fa;
    font-weight: bold;
    color: #003366;
    text-align: left;
    border-right: 2px solid #003366;
}

.cfa-forecast-table td.today {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
}

.forecast-cell .cfa-fire-danger-badge {
    margin-bottom: 8px;
    font-size: 0.9em;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

.cfa-total-fire-ban-small {
    background: #dc3545;
    color: white;
    font-size: 0.8em;
    padding: 4px 8px;
    border-radius: 3px;
    font-weight: bold;
    display: inline-block;
    margin-top: 5px;
}