/*
 * myweather.css - Styles for My Outlook weather page
 */

/* ==========================================================================
   Page Layout changed for mobile optimization
   ========================================================================== */

body {
    padding-top: 64px;
    margin: 0;
    background: var(--sky-gray, #F0F4F8);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.page-container {
    display: flex;
    min-height: calc(100vh - 64px);
}

.main-content {
    flex: 1;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ==========================================================================
   Forecast Analysis Section (Expandable)
   ========================================================================== */

.forecast-analysis-section {
    background: white;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color, #E5E7EB);
    overflow: hidden;
}

.analysis-header {
    position: relative;
}

.analysis-toggle {
    width: 100%;
    padding: 16px 20px;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: 'Inter', sans-serif;
    text-align: left;
    justify-content: space-between;
}

.analysis-toggle:hover {
    background-color: var(--sky-gray, #F0F4F8);
}

.analysis-toggle:focus {
    outline: 2px solid var(--ocean-blue);
    outline-offset: -2px;
}

.analysis-toggle .toggle-icon {
    font-size: 24px;
    color: var(--text-secondary, #6B7280);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.analysis-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.analysis-toggle .analysis-icon {
    font-size: 20px;
    color: var(--ocean-blue, #068297);
    flex-shrink: 0;
    margin-left: 0;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.analysis-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--midnight-navy, #0F172A);
    margin-left: 4px;
}

.analysis-updated {
    font-size: 12px;
    color: var(--text-secondary, #6B7280);
    margin-left: 8px;
}

.analysis-content {
    border-top: 1px solid var(--border-color, #E5E7EB);
    background: var(--sky-gray, #F0F4F8);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 500px;
        opacity: 1;
    }
}

.forecast-summary {
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary, #1F2937);
}

.forecast-summary p {
    margin: 0;
}

.forecast-summary .no-summary {
    color: var(--text-secondary, #6B7280);
    font-style: italic;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--ocean-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container p {
    color: var(--text-secondary);
    font-size: var(--text-base);
}

/* ==========================================================================
   Authentication Message
   ========================================================================== */

.auth-message {
    max-width: 600px;
    margin: 100px auto;
    text-align: center;
    padding: 48px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--elevation-2);
}

.auth-message h2 {
    font-size: var(--text-2xl);
    color: var(--text-primary);
    margin-bottom: 16px;
}

.auth-message p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.auth-message .btn {
    margin: 0 8px;
}

/* ==========================================================================
   Content Header
   ========================================================================== */

/* Location Navigation */
.location-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    padding: 24px 0;
}

.nav-arrow {
    background: white;
    border: 2px solid var(--ocean-blue);
    border-radius: 50%;
    min-width: 48px; /* Increased from 40px for better touch target */
    min-height: 48px; /* Increased from 40px for better touch target */
    width: 48px;
    height: 48px;
    padding: 12px; /* Added padding for better touch area */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--ocean-blue);
    font-weight: 600;
}

.nav-arrow:hover:not(:disabled) {
    background: var(--ocean-blue);
    color: white;
    border-color: var(--ocean-blue);
    transform: scale(1.1);
}

.nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-arrow .material-icons {
    font-size: 24px;
}

.location-header {
    text-align: center;
    min-width: 300px;
}

.location-header h1 {
    font-size: var(--text-4xl);
    color: var(--text-primary);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.location-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    font-weight: 400;
    margin: 4px 0 0 0;
}

/* Forecast Info Bar */
.forecast-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--sky-gray);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.info-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-icon {
    background: transparent;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.help-icon:hover {
    color: var(--ocean-blue);
    background: var(--state-hover);
}

.btn-icon {
    min-width: 48px; /* Increased from 40px for better touch target */
    min-height: 48px; /* Increased from 40px for better touch target */
    width: 48px;
    height: 48px;
    padding: 12px; /* Added padding for better touch area */
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--state-hover);
    border-color: var(--ocean-blue);
}

.btn-icon .material-icons {
    font-size: 20px;
    color: var(--text-secondary);
}

.last-updated {
    font-size: var(--text-sm);
    color: #1F2937; /* Darker gray for better contrast (was var(--text-secondary)) */
    display: flex;
    align-items: center;
    gap: 8px;
}

.last-updated .noaa-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* ==========================================================================
   Forecast Container
   ========================================================================== */

.forecast-container {
    width: 100%;
    max-width: 1200px;
}

/* ==========================================================================
   Forecast Grid - Vertical Row Layout
   ========================================================================== */

.forecast-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==========================================================================
   Forecast Row
   ========================================================================== */

.forecast-row {
    background: white;
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--elevation-1);
    transition: all 0.2s;
    position: relative;
    margin-bottom: 8px;
}

.forecast-row:hover {
    box-shadow: var(--elevation-2);
}

.forecast-row.today {
    background: linear-gradient(135deg, var(--ocean-blue) 0%, #0a9eb8 100%);
    color: white;
    padding: 20px;
}

.forecast-row.today .day-name,
.forecast-row.today .date,
.forecast-row.today .temp-high,
.forecast-row.today .temp-low,
.forecast-row.today .day-forecast {
    color: white;
}

.forecast-row.today .night-forecast,
.forecast-row.today .detail-item {
    color: rgba(255, 255, 255, 0.9);
}

.forecast-content {
    display: grid;
    grid-template-columns: 110px 50px 200px minmax(300px, 1fr);
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 60px; /* Ensure consistent row height */
}

/* Date Section */
.forecast-date-section {
    display: flex;
    flex-direction: column;
}

.day-name {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.date {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Weather Icon */
.forecast-icon-section {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.weather-icon {
    font-size: 40px;
    color: var(--ocean-blue);
}

.forecast-row.today .weather-icon {
    color: white;
}

/* Weather severity colors */
.weather-extreme .weather-icon { color: var(--hibiscus-red); }
.weather-severe .weather-icon { color: var(--sunset-orange); }
.weather-high .weather-icon { color: var(--sunrise-yellow); }
.weather-moderate .weather-icon { color: var(--ocean-blue); }
.weather-low .weather-icon { color: var(--text-secondary); }
.weather-normal .weather-icon { color: var(--ocean-blue); }

/* Sunny day specific icons */
.weather-icon.sunny-icon { color: var(--sunrise-yellow) !important; }

/* Temperature Section */
.temperature-section {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.temperature-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.temp-low {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    width: 35px;
    text-align: right;
}

.temp-high {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    width: 35px;
    text-align: left;
}

/* Temperature Bar */
.temperature-bar-container {
    position: relative;
    flex: 1;
    height: 8px;
    display: flex;
    align-items: center;
}

.temperature-bar-background {
    position: absolute;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg,
        var(--ocean-blue) 0%,      /* 0-32° */
        var(--ocean-blue) 25%,
        var(--palm-green) 35%,     /* 32-60° */
        var(--palm-green) 55%,
        var(--sunrise-yellow) 60%, /* 61-72° */
        var(--sunrise-yellow) 70%,
        var(--sunset-orange) 75%,  /* 72-85° */
        var(--sunset-orange) 85%,
        var(--hibiscus-red) 90%,   /* 85+° */
        var(--hibiscus-red) 100%);
    border-radius: 2px;
    opacity: 0.2;
}

.temperature-bar-fill {
    position: absolute;
    height: 8px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Forecast Description and Details Combined */
.forecast-info-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.forecast-description-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.day-forecast {
    font-size: var(--text-sm);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.night-forecast {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Forecast Details */
.forecast-details-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    white-space: nowrap;
}

.detail-item .material-icons {
    font-size: 16px;
}

.precip-chance .material-icons {
    color: #60a5fa;
}

.wind-info .material-icons {
    color: var(--text-muted);
}

/* Threat Section */
.threat-section {
    grid-column: 1 / -1;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.forecast-row.today .threat-section {
    border-top-color: rgba(255, 255, 255, 0.2);
}

/* Active threat display */
.threat-section:not(.threat-placeholder) {
    border-top: none;
    margin-top: 8px;
    padding: 0;
}

.threat-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.threat-icon {
    font-size: 20px;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.95);
}

.threat-description {
    font-size: var(--text-sm);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.4;
}

/* Threat levels with opacity built in */
.threat-minimal {
    /* No background - minimal threat */
}

.threat-low {
    /* Styles applied inline with opacity */
}

.threat-moderate {
    /* Styles applied inline with opacity */
}

.threat-high,
.threat-extreme {
    /* Styles applied inline with opacity */
}

/* Today's forecast with threat */
.forecast-row.today .threat-content {
    background-color: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px);
}

.forecast-row.today .threat-icon,
.forecast-row.today .threat-description {
    color: rgba(255, 255, 255, 0.95);
}

/* Placeholder for when threats aren't available */
.threat-placeholder {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: var(--sky-gray);
    border: 1px dashed var(--border-color);
}

.forecast-row.today .threat-placeholder {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.threat-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.threat-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.threat-coming-soon {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.forecast-row.today .threat-label,
.forecast-row.today .threat-coming-soon {
    color: rgba(255, 255, 255, 0.8);
}

/* Detailed forecast (for today) */
.detailed-forecast {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.forecast-row.today .detailed-forecast {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.detailed-forecast p {
    font-size: var(--text-sm);
    line-height: 1.6;
    margin: 0;
    color: var(--text-secondary);
}

.forecast-row.today .detailed-forecast p {
    color: rgba(255, 255, 255, 0.95);
}


/* ==========================================================================
   Error State
   ========================================================================== */

.error-message {
    text-align: center;
    padding: 48px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--elevation-2);
    max-width: 600px;
    margin: 48px auto;
}

.error-message .material-icons {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.error-message h3 {
    font-size: var(--text-xl);
    color: var(--text-primary);
    margin-bottom: 12px;
}

.error-message p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.no-forecast-data {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px;
    color: var(--text-secondary);
}

.no-forecast-data .material-icons {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--ocean-blue);
    color: white;
}

.btn-primary:hover {
    background: #057489;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--ocean-blue);
    border: 1px solid var(--ocean-blue);
}

.btn-secondary:hover {
    background: var(--state-hover);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet View */
@media (max-width: 1024px) {
    .forecast-content {
        grid-template-columns: 100px 40px 160px 1fr;
        gap: 8px;
    }

    .forecast-info-section {
        flex-direction: column;
        align-items: stretch;
    }

    .forecast-description-section {
        width: 100%;
    }

    .day-forecast,
    .night-forecast {
        white-space: normal;
    }

    .forecast-details-section {
        margin-top: 4px;
    }

    .threat-section {
        margin-top: 8px;
    }
}


/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 600px;
    max-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--elevation-3);
}

.modal-header {
    padding: var(--spacing-6);
    background: var(--ocean-blue);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h2 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: white;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
    opacity: 0.8;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.modal-body {
    padding: var(--spacing-6);
    overflow-y: auto;
    flex: 1;
}

.help-content {
    line-height: 1.6;
    color: var(--text-primary);
}

.help-content h3 {
    margin-top: var(--spacing-5);
    margin-bottom: var(--spacing-3);
    color: var(--ocean-blue);
    font-size: var(--text-lg);
}

.help-content ul {
    margin: var(--spacing-3) 0;
    padding-left: var(--spacing-5);
}

.help-content li {
    margin-bottom: var(--spacing-3);
}

.help-content strong {
    color: var(--sunset-orange);
    font-weight: 600;
}

.help-note {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-2);
    background: var(--sky-gray);
    padding: var(--spacing-4);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-5);
}

.help-note .material-icons {
    font-size: 20px;
    color: var(--ocean-blue);
    margin-top: 2px;
}

/* Mobile View */
@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }

    .location-navigation {
        padding: 16px 0;
        gap: 12px;
    }

    .location-header {
        min-width: auto;
    }

    .location-header h1 {
        font-size: var(--text-2xl);
    }

    .location-subtitle {
        font-size: var(--text-base);
    }

    .nav-arrow {
        width: 36px;
        height: 36px;
    }

    .forecast-info-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }


    .forecast-grid {
        gap: 8px;
    }

    .forecast-row {
        padding: 12px;
    }

    .forecast-content {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .forecast-date-section {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .forecast-icon-section {
        align-self: center;
        margin: 8px 0;
    }

    .temperature-section {
        width: 100%;
    }

    .temperature-display {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 8px;
    }

    .temperature-bar-container {
        flex: 1;
        min-width: 120px;
        max-width: 200px;
        height: 8px;
    }

    .forecast-info-section {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .forecast-description-section {
        width: 100%;
    }

    .day-forecast,
    .night-forecast {
        white-space: normal;
    }

    .forecast-details-section {
        justify-content: center;
        margin-top: 8px;
    }

    .threat-section {
        margin-top: 8px;
        padding-top: 8px;
    }

    .weather-icon {
        font-size: 36px;
    }

    .forecast-row.expanded .detailed-forecast {
        display: block;
    }

    .forecast-row:not(.expanded) .detailed-forecast {
        display: none;
    }

    .forecast-row.expanded {
        box-shadow: var(--elevation-3);
    }

}

/* Small Mobile */
@media (max-width: 375px) {

    .forecast-card {
        padding: 12px;
    }

    .temp-high,
    .temp-low {
        font-size: var(--text-sm);
        min-width: 28px;
    }

    .temperature-bar-container {
        min-width: 80px;
    }
}

/* ==========================================================================
   Threat Color Grid (Help Modal)
   ========================================================================== */

.threat-color-grid {
    display: grid;
    grid-template-columns: 120px repeat(3, 1fr);
    gap: 8px;
    margin: var(--spacing-4) 0;
    font-size: var(--text-sm);
}

.grid-header {
    font-weight: 600;
    color: var(--text-primary);
    padding: 8px;
    text-align: center;
    background: var(--sky-gray);
    border-radius: var(--radius-sm);
}

.grid-label {
    font-weight: 600;
    color: var(--text-primary);
    padding: 8px;
    display: flex;
    align-items: center;
    background: var(--sky-gray);
    border-radius: var(--radius-sm);
}

.threat-box {
    padding: 12px 8px;
    text-align: center;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 500;
    font-size: var(--text-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

@media (max-width: 768px) {
    .threat-color-grid {
        grid-template-columns: 80px repeat(3, 1fr);
        gap: 6px;
        font-size: var(--text-xs);
    }

    .grid-header,
    .grid-label {
        padding: 6px 4px;
        font-size: 10px;
    }

    .threat-box {
        padding: 8px 4px;
        font-size: 9px;
        min-height: 36px;
    }
}

/* ==========================================================================
   NEW REDESIGN STYLES - CSS Grid Layout
   ========================================================================== */

/* Location Header with Tabs */
.location-header-info {
    text-align: center;
    min-width: 300px;
}

.location-header-info h1 {
    font-size: 32px;
    color: var(--midnight-navy, #0F172A);
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 24px;
    justify-content: center;
    border-bottom: 2px solid var(--border-color, #E5E7EB);
    padding-bottom: 8px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px; /* Increased spacing */
    min-height: 48px; /* Minimum touch target height */
    padding: 12px 16px; /* Increased padding for better touch area */
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: var(--text-secondary, #6B7280);
    transition: all 0.2s;
    margin-bottom: -10px;
}

.tab-btn i {
    width: 18px;
    height: 18px;
}

.tab-btn:hover:not(.disabled) {
    color: var(--ocean-blue, #068297);
}

.tab-btn.active {
    color: var(--ocean-blue, #068297);
    border-bottom-color: var(--ocean-blue, #068297);
    font-weight: 600;
}

.tab-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tab-btn .coming-soon {
    font-size: 11px;
    color: var(--text-muted, #9CA3AF);
    margin-left: 4px;
}

/* Forecast Page Grid Layout - Desktop */
.forecast-page-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto auto;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.grid-item {
    min-height: 0; /* Important for grid items */
}

.grid-full-width {
    grid-column: 1 / -1;
}

/* Card Styles */
.current-conditions-card,
.ai-summary-24h-card,
.ai-summary-7day-card,
.hourly-chart-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color, #E5E7EB);
}

.card-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--midnight-navy, #0F172A);
    margin: 0;
}

.header-icon {
    width: 20px;
    height: 20px;
    color: var(--ocean-blue, #068297);
}

/* Current Conditions Card */
.current-conditions-card {
    background: var(--ocean-blue, #068297);
    color: white;
    min-height: auto;
}

.current-conditions-card .card-header {
    border-bottom-color: rgba(255, 255, 255, 0.2);
    background: transparent;
}

.current-conditions-card .card-header h2 {
    color: white;
}

.current-conditions-card .last-updated {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    margin-top: 4px;
}

.current-main {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    padding: 24px;
}

.current-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 0 0 40%;
}

.current-icon {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-icon i {
    display: block;
    width: 140px;
    height: 140px;
}

.current-icon svg {
    width: 140px !important;
    height: 140px !important;
}

.current-temp-section {
    flex-shrink: 0;
    text-align: center;
}

.current-temp {
    font-size: 64px;
    font-weight: 300;
    line-height: 1;
    color: white;
    margin-bottom: 8px;
}

.current-conditions {
    font-size: 18px;
    color: white;
    margin-bottom: 4px;
}

.feels-like {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.current-details-grid {
    flex: 0 0 60%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 20px 24px;
}

/* Add padding to columns 2 and 3 on desktop */
.current-details-grid .detail-item:nth-child(2),
.current-details-grid .detail-item:nth-child(3),
.current-details-grid .detail-item:nth-child(5),
.current-details-grid .detail-item:nth-child(6) {
    padding-left: 30px;
}

.current-details-grid .detail-item {
    min-width: 0;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.detail-icon {
    width: 20px !important;
    height: 20px !important;
    color: white;
    flex-shrink: 0;
}

.detail-content {
    flex: 1;
}

.detail-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2px;
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: white;
}

/* AI Summary Cards */
.ai-summary-24h-card {
    border: 2px solid var(--ocean-blue, #068297);
    min-height: 280px;
}

.ai-summary-24h-card .card-header h2 {
    color: var(--ocean-blue, #068297);
}

.timeframe {
    font-size: 12px;
    color: var(--text-secondary, #6B7280);
    margin-top: 4px;
}

.summary-content {
    padding: 20px;
}

.summary-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--midnight-navy, #0F172A);
    margin: 0;
}

.summary-text.placeholder-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary, #6B7280);
    font-style: italic;
}

.action-recommendations {
    background: var(--sky-gray, #F0F4F8);
    padding: 16px;
    margin: 16px 20px 20px;
    border-radius: 6px;
}

.actions-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--midnight-navy, #0F172A);
    margin-bottom: 12px;
}

.actions-header i {
    width: 16px !important;
    height: 16px !important;
    color: var(--ocean-blue, #068297);
}

.actions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.actions-list li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-primary, #1F2937);
}

.actions-list li:last-child {
    margin-bottom: 0;
}

.actions-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--ocean-blue, #068297);
    font-weight: bold;
}

/* AI 7-Day Summary Card */
.ai-summary-7day-card {
    background: #FEF3C7;
    border: 2px solid #F59E0B;
}

.ai-summary-7day-card .card-header {
    border-bottom-color: #FDE68A;
}

.ai-summary-7day-card .card-header h2 {
    color: #92400E;
}

.ai-summary-7day-card .summary-text {
    color: var(--midnight-navy, #0F172A);
}

.key-timing {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #DC2626;
    margin: 16px 20px;
}

.key-timing i {
    width: 16px !important;
    height: 16px !important;
}

.summary-footer {
    padding: 0 20px 20px;
}

.updated-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary, #6B7280);
}

.footer-icon {
    width: 14px !important;
    height: 14px !important;
}

/* Hourly Chart Card */
.hourly-chart-card {
    min-height: 450px;
}

.chart-summary {
    padding: 16px 20px;
    background: var(--sky-gray, #F0F4F8);
    border-bottom: 1px solid var(--border-color, #E5E7EB);
}

.chart-summary .summary-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--midnight-navy, #0F172A);
    margin: 0;
}

.chart-summary .summary-text.placeholder-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary, #6B7280);
    font-style: italic;
}

.chart-summary .summary-text.placeholder-text i {
    width: 16px !important;
    height: 16px !important;
}

/* Forecast tabs */
.forecast-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 20px 0;
    border-bottom: 1px solid var(--border-color, #E5E7EB);
    background: white;
    overflow-x: auto;
}

.forecast-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary, #6B7280);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.forecast-tab:hover {
    background: var(--sky-gray, #F0F4F8);
    color: var(--midnight-navy, #0F172A);
}

.forecast-tab.active {
    color: var(--ocean-blue, #068297);
    border-bottom-color: var(--ocean-blue, #068297);
    background: transparent;
}

.forecast-tab i {
    width: 16px !important;
    height: 16px !important;
}

.forecast-tab span {
    font-family: 'Inter', sans-serif;
}

.chart-wrapper {
    padding: 20px;
    min-height: 400px;
}

#hourlyChart {
    width: 100% !important;
    height: 400px !important;
}

/* Map View Placeholder */
.map-view {
    padding: 48px;
    text-align: center;
}

.map-placeholder {
    background: white;
    border-radius: 8px;
    padding: 48px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.map-placeholder i {
    width: 64px !important;
    height: 64px !important;
    color: var(--text-muted, #9CA3AF);
    margin-bottom: 16px;
}

.map-placeholder p {
    font-size: 16px;
    color: var(--text-secondary, #6B7280);
}

/* No Data States */
.current-conditions-card.no-data,
.hourly-chart-card.no-data,
.ai-summary-7day-card.no-data {
    border: 1px solid var(--border-color, #E5E7EB);
}

.no-data-message {
    padding: 48px 20px;
    text-align: center;
}

.no-data-message i {
    width: 48px !important;
    height: 48px !important;
    color: var(--text-muted, #9CA3AF);
    margin-bottom: 12px;
}

.no-data-message p {
    font-size: 14px;
    color: var(--text-secondary, #6B7280);
    margin: 0;
}

/* Mobile Responsive - New Grid Layout */
@media (max-width: 767px) {
    body {
        min-width: 320px;
    }

    .forecast-page-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0;
    }

    .grid-full-width {
        grid-column: 1;
    }

    .location-header-info h1 {
        font-size: 24px;
    }

    .tab-navigation {
        gap: 12px;
    }

    .tab-btn {
        font-size: 14px;
        padding: 6px 8px;
    }

    .tab-btn i {
        width: 16px !important;
        height: 16px !important;
    }

    .current-conditions-card {
        min-height: auto;
    }

    .current-main {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .current-left {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        width: 100%;
    }

    .current-icon {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }

    .current-icon i {
        width: 80px;
        height: 80px;
    }

    .current-icon svg {
        width: 80px !important;
        height: 80px !important;
    }

    .current-temp-section {
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: left;
    }

    .current-temp {
        font-size: 48px;
        line-height: 1;
    }

    .current-conditions {
        font-size: 16px;
        margin-top: 4px;
    }

    .current-details-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        gap: 16px;
        width: 100%;
    }

    .current-details-grid .detail-item {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* Remove column padding on mobile */
    .current-details-grid .detail-item:nth-child(2),
    .current-details-grid .detail-item:nth-child(3),
    .current-details-grid .detail-item:nth-child(5),
    .current-details-grid .detail-item:nth-child(6) {
        padding-left: 0;
    }

    .ai-summary-24h-card {
        min-height: auto;
    }

    .hourly-chart-card {
        min-height: 400px;
    }

    .chart-wrapper {
        min-height: 350px;
        padding: 16px;
    }

    #hourlyChart {
        height: 350px !important;
    }

    /* Forecast tabs mobile */
    .forecast-tabs {
        padding: 8px 16px 0;
        gap: 2px;
    }

    .forecast-tab {
        padding: 6px 12px;
        font-size: 12px;
    }

    .forecast-tab span {
        display: none;
    }

    .forecast-tab i {
        width: 18px !important;
        height: 18px !important;
    }
}
/* ==========================================================================
   HORIZONTAL 7-DAY FORECAST TABLE
   ========================================================================== */

.forecast-horizontal-table {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.forecast-table-header {
    padding: 20px;
    background: var(--sky-gray, #F0F4F8);
    border-bottom: 2px solid var(--border-color, #E5E7EB);
}

.forecast-table-header h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--midnight-navy, #0F172A);
    display: flex;
    align-items: center;
    gap: 8px;
}

.forecast-table-header .header-icon {
    width: 20px;
    height: 20px;
    color: var(--ocean-blue, #068297);
}

.forecast-generated-time {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: var(--text-secondary, #6B7280);
    font-weight: 400;
}

/* AI Summary in Forecast Header */
.forecast-header-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-summary-text {
    margin: 0;
    padding: 0;
    background: transparent;
}

.ai-summary-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary, #1F2937);
}

.key-timing-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #FEF3C7;
    border-left: 3px solid #F59E0B;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #92400E;
}

.key-timing-inline i {
    width: 16px;
    height: 16px;
    color: #F59E0B;
}

/* Days Container - Horizontal Layout */
.forecast-days-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    padding: 24px 16px;
    min-height: 450px;
}

/* Individual Day Column */
.forecast-day-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    position: relative;
}

.forecast-day-column:hover {
    background: var(--sky-gray, #F0F4F8);
    transform: translateY(-2px);
}

.forecast-day-column.selected {
    background: var(--sky-gray, #F0F4F8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.forecast-day-column.today {
    /* No special styling - will use .selected class instead */
}

/* Temperature Container with Vertical Bar */
.day-temp-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    flex: 1;
    min-height: 280px;
}

.temp-high-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--midnight-navy, #0F172A);
    text-align: center;
}

.temp-bar-track {
    position: relative;
    width: 32px;
    flex: 1;
    /* NO background - we only show the floating range bar */
}

.temp-bar-fill {
    position: absolute;
    left: 0;
    right: 0;
    width: 32px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.temp-low-label {
    font-size: 14px; /* Kept at 14px for better legibility */
    font-weight: 500;
    color: #1F2937; /* Darker gray for better contrast (was #6B7280) */
    text-align: center;
}

/* Removed today-specific temp label styling */

/* Icon Container */
.day-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.weather-icon-large {
    width: 48px !important;
    height: 48px !important;
    color: var(--ocean-blue, #068297);
}

/* Date Container */
.day-date-container {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.day-date {
    font-size: 14px; /* Kept at 14px for better legibility */
    font-weight: 600;
    color: #374151; /* Darker for better contrast */
    text-align: center;
    white-space: nowrap;
}

.alert-indicator {
    width: 16px !important;
    height: 16px !important;
    color: var(--sunset-orange, #FFB020);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Details Row (Expandable) */
.forecast-details-row {
    border-top: 2px solid var(--border-color, #E5E7EB);
    animation: slideDown 0.3s ease-out;
}

.details-content {
    padding: 24px;
}

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

.details-header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--midnight-navy, #0F172A);
}

.close-details {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.close-details:hover {
    background: var(--sky-gray, #F0F4F8);
}

.close-details i {
    width: 24px !important;
    height: 24px !important;
    color: var(--text-secondary, #6B7280);
}

.details-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.details-forecast,
.details-threats {
    padding: 16px;
    background: var(--sky-gray, #F0F4F8);
    border-radius: 8px;
}

.details-forecast h5,
.details-threats h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ocean-blue, #068297);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.details-forecast p {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary, #1F2937);
}

.details-forecast p:last-child {
    margin-bottom: 0;
}

.threat-description {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary, #1F2937);
}

.night-forecast-header {
    margin-top: 16px !important;
}

/* Threat List in Details */
.threat-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.threat-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 6px;
    align-items: flex-start;
}

.threat-icon-small {
    width: 20px !important;
    height: 20px !important;
    color: white;
    flex-shrink: 0;
}

.threat-text {
    flex: 1;
    color: white;
}

.threat-type {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    color: white;
}

.threat-desc {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
    color: white;
}

.threat-meta {
    font-size: 12px; /* Increased from 11px for better legibility */
    color: #374151; /* Explicit color for better contrast */
    opacity: 1; /* Removed opacity reduction */
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .forecast-days-container {
        grid-template-columns: repeat(7, 1fr);
        gap: 8px;
        padding: 16px 8px;
    }

    .forecast-day-column {
        padding: 12px 4px;
        gap: 12px;
    }

    .temp-high-label {
        font-size: 16px;
    }

    .temp-bar-track {
        width: 24px;
    }

    .temp-bar-fill {
        width: 24px;
    }

    .day-icon-container {
        width: 36px;
        height: 36px;
    }

    .weather-icon-large {
        width: 36px !important;
        height: 36px !important;
    }

    .day-date {
        font-size: 12px;
    }

    .details-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .forecast-days-container {
        grid-template-columns: repeat(7, 1fr);
        min-height: auto;
        padding: 16px 4px;
        gap: 4px;
    }

    .forecast-day-column {
        padding: 8px 2px;
        gap: 8px;
    }

    .day-temp-container {
        min-height: 140px;
    }

    .temp-high-label {
        font-size: 13px;
    }

    .temp-bar-track {
        width: 18px;
    }

    .temp-bar-fill {
        width: 18px;
    }

    .temp-low-label {
        font-size: 11px;
    }

    .day-icon-container {
        width: 28px;
        height: 28px;
    }

    .weather-icon-large {
        width: 28px !important;
        height: 28px !important;
    }

    .day-date {
        font-size: 10px;
        line-height: 1.3;
    }

    .details-content {
        padding: 16px;
    }

    .details-header h4 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .forecast-days-container {
        grid-template-columns: repeat(7, 1fr);
        padding: 12px 2px;
        gap: 2px;
    }

    .forecast-day-column {
        padding: 6px 1px;
        gap: 6px;
    }

    .day-temp-container {
        min-height: 100px;
    }

    .temp-high-label {
        font-size: 11px;
    }

    .temp-bar-track {
        width: 14px;
    }

    .temp-bar-fill {
        width: 14px;
    }

    .temp-low-label {
        font-size: 10px;
    }

    .day-icon-container {
        width: 24px;
        height: 24px;
    }

    .weather-icon-large {
        width: 24px !important;
        height: 24px !important;
    }

    .day-date {
        font-size: 9px;
        line-height: 1.2;
    }

    .alert-indicator {
        width: 12px !important;
        height: 12px !important;
    }
}

/* ============================================
   ACTIVE ALERTS CARD STYLES
   ============================================ */

.active-alerts-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.alert-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.alert-card-header .alert-icon {
    width: 28px;
    height: 28px;
    color: #FF8800;
}

.alert-card-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.alerts-compact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-compact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    border-left: 4px solid #FF8800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-compact-item:hover {
    background: #f0f0f0;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-compact-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-compact-icon i {
    width: 32px;
    height: 32px;
}

.alert-compact-content {
    flex: 1;
    min-width: 0;
}

.alert-compact-event {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.alert-compact-headline {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.alert-compact-arrow {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.alert-compact-item:hover .alert-compact-arrow {
    opacity: 1;
}

.no-alerts-message {
    padding: 24px;
    text-align: center;
}

.no-alerts-message p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* ============================================
   ALERT MODAL STYLES
   ============================================ */

.alert-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.alert-modal.active {
    display: flex;
}

.alert-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.alert-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px 20px;
    border-bottom: 2px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
    border-radius: 16px 16px 0 0;
}

.alert-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.alert-modal-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-modal-close:hover {
    background: #e0e0e0;
}

.alert-modal-close i {
    width: 20px;
    height: 20px;
    color: #666;
}

.alert-modal-body {
    padding: 24px 32px 32px;
}

.alert-modal-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.alert-modal-severity {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alert-modal-time {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.alert-modal-section {
    margin-bottom: 24px;
}

.alert-modal-section:last-child {
    margin-bottom: 0;
}

.alert-modal-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.alert-modal-headline {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.6;
    padding: 16px;
    background: #fffbea;
    border-left: 4px solid #ffd700;
    border-radius: 6px;
}

.alert-modal-text {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    white-space: pre-wrap;
}

.alert-modal-instructions {
    padding: 16px;
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    border-radius: 6px;
}

.alert-timing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.timing-item {
    padding: 12px 16px;
    background: #fafafa;
    border-radius: 8px;
    border-left: 3px solid #ddd;
}

.timing-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.timing-value {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

.alert-modal-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #888;
    text-align: center;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .alert-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .alert-modal-header {
        padding: 20px 20px 16px;
    }

    .alert-modal-header h2 {
        font-size: 20px;
    }

    .alert-modal-body {
        padding: 20px;
    }

    .alert-modal-close {
        width: 32px;
        height: 32px;
    }

    .alert-compact-item {
        padding: 12px;
        gap: 12px;
    }

    .alert-compact-icon {
        width: 28px;
        height: 28px;
    }

    .alert-compact-icon i {
        width: 28px;
        height: 28px;
    }

    .alert-timing-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Personal Forecast View
   ========================================================================== */

.personal-view {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* Personal Forecast Card */
.personal-forecast-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.personal-forecast-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--sky-gray, #F0F4F8);
}

.personal-forecast-card .card-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--midnight-navy, #0F172A);
}

.personal-forecast-card .header-icon {
    width: 28px;
    height: 28px;
    color: var(--ocean-blue, #068297);
}

.forecast-type-badge {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--sky-gray, #F0F4F8);
    color: var(--text-secondary, #6B7280);
}

/* Profile Notice */
.profile-notice {
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: start;
    gap: 12px;
    font-size: 14px;
    color: #78350F;
}

.profile-notice i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.profile-link {
    color: #0369A1;
    text-decoration: underline;
    font-weight: 500;
}

.profile-link:hover {
    color: #0284C7;
}

/* Active Alerts in Personal Forecast */
.personal-forecast-alerts {
    background: #FEE2E2;
    border: 1px solid #FCA5A5;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.personal-forecast-alerts .alerts-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #991B1B;
    font-weight: 600;
}

.personal-forecast-alerts .alerts-header i {
    width: 20px;
    height: 20px;
}

.alerts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #FCA5A5;
}

.alert-item:last-child {
    border-bottom: none;
}

.alert-event {
    font-weight: 500;
    color: #7F1D1D;
}

.alert-severity {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.severity-extreme {
    background: #7F1D1D;
    color: white;
}

.severity-severe {
    background: #DC2626;
    color: white;
}

.severity-moderate {
    background: #F59E0B;
    color: white;
}

.severity-minor {
    background: #FDE68A;
    color: #78350F;
}

/* Forecast Sections */
.forecast-section {
    margin-bottom: 32px;
    display: flex;
    gap: 16px;
}

.forecast-section:last-child {
    margin-bottom: 0;
}

.section-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sky-gray, #F0F4F8);
    border-radius: 8px;
    color: var(--ocean-blue, #068297);
}

.section-icon i {
    width: 24px;
    height: 24px;
}

.section-content {
    flex: 1;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--midnight-navy, #0F172A);
    margin: 0 0 12px 0;
}

.headline-text {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--midnight-navy, #0F172A);
    margin: 0;
}

.forecast-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary, #374151);
}

.forecast-text p {
    margin: 0 0 16px 0;
}

.forecast-text p:last-child {
    margin-bottom: 0;
}

/* Forecast Footer */
.forecast-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color, #E5E7EB);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.generated-info,
.ai-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary, #6B7280);
}

.generated-info i,
.ai-info i {
    width: 16px;
    height: 16px;
}

/* Empty States */
.personal-forecast-card.no-data,
.personal-forecast-card.error-state {
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
}

.empty-state i {
    width: 64px;
    height: 64px;
    color: var(--text-secondary, #6B7280);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--midnight-navy, #0F172A);
    margin: 0 0 12px 0;
}

.empty-state p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary, #6B7280);
    margin: 0 0 8px 0;
    max-width: 500px;
}

.setup-message {
    margin-top: 16px !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .personal-forecast-card {
        padding: 20px;
    }

    .personal-forecast-card .card-header h2 {
        font-size: 20px;
    }

    .forecast-section {
        flex-direction: column;
        gap: 12px;
    }

    .section-icon {
        width: 36px;
        height: 36px;
    }

    .headline-text {
        font-size: 16px;
    }

    .forecast-text {
        font-size: 14px;
    }

    .forecast-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
