/* Forecast Page Specific Styles */

/* Search Section */
.search-section {
    background: linear-gradient(rgba(28, 35, 49, 0.8), rgba(28, 35, 49, 0.9)), url('../images/weather-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.search-section h1 {
    margin-bottom: 2rem;
    color: var(--color-text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.search-button {
    position: absolute;
    right: 5px;
    top: 5px;
    background-color: var(--color-accent);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background-color: var(--color-accent-light);
}

.search-error {
    color: var(--color-danger);
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Risk Section */
.risk-section {
    margin-bottom: 2rem;
}

.risk-card {
    background-color: var(--color-risk-low);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.risk-card h2 {
    margin-bottom: 1.25rem;
    color: white;
}

.risk-level-container {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

#riskLevelLabel {
    font-weight: 600;
    margin-right: 1rem;
}

.risk-level {
    font-size: 1.5rem;
    font-weight: bold;
}

.risk-description {
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Current Weather Section */
.current-weather-section {
    margin-bottom: 2rem;
}

.weather-card {
    background-color: var(--color-background-card);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.location-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.location-header h2 {
    margin-bottom: 0;
}

.last-updated {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.current-weather-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.current-weather-main {
    flex: 1 1 300px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.temperature-container {
    flex: 1;
}

.current-temp {
    font-size: 4rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.feels-like {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.condition-container {
    text-align: center;
    flex: 1;
}

.weather-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 0.5rem;
}

.weather-condition {
    font-size: 1.25rem;
    margin: 0;
}

.current-weather-details {
    flex: 1 1 300px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}

.weather-detail {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.detail-label i {
    width: 16px;
    text-align: center;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 500;
}

.moon-phase-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.moon-phase-icon {
    width: 30px;
    height: 30px;
}

/* Radar Section */
.radar-section {
    margin-bottom: 2rem;
}

#radarContainer {
    width: 100%;
    height: 400px;
    position: relative;
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rainviewer-layer {
    mix-blend-mode: normal !important;
    pointer-events: none;
    opacity: 0.7 !important;
}

.leaflet-tile-container {
    opacity: 1 !important;
    visibility: visible !important;
}

.leaflet-tile {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Forecast Section */
.forecast-section {
    margin-bottom: 2rem;
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.forecast-day {
    background-color: var(--color-background-card);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.forecast-day:hover {
    transform: translateY(-5px);
}

.forecast-date {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.forecast-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
}

.forecast-condition {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    min-height: 40px;
}

.forecast-temps {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.forecast-high, .forecast-low {
    display: flex;
    flex-direction: column;
}

.forecast-high span:first-child, .forecast-low span:first-child {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.forecast-high span:last-child {
    color: var(--color-danger);
    font-weight: 600;
}

.forecast-low span:last-child {
    color: var(--color-info);
}

.forecast-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Alerts Section */
.alerts-section {
    margin-bottom: 2rem;
}

.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-item {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background-color: var(--color-background-card);
}

.alert-item .alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.alert-item.severity-high .alert-header {
    background: linear-gradient(45deg, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0.02));
}

.alert-item.severity-medium .alert-header {
    background: linear-gradient(45deg, rgba(251, 146, 60, 0.1), rgba(251, 146, 60, 0.02));
}

.alert-item.severity-low .alert-header {
    background: linear-gradient(45deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.02));
}

.alert-item .alert-severity {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alert-item .alert-severity.severity-high {
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--color-risk-extreme);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.alert-item .alert-severity.severity-high::before {
    content: "\f071";  /* Font Awesome warning icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 0.4rem;
}

.alert-item .alert-severity.severity-medium {
    background-color: rgba(251, 146, 60, 0.1);
    color: var(--color-risk-high);
    border: 1px solid rgba(251, 146, 60, 0.2);
}

.alert-item .alert-severity.severity-medium::before {
    content: "\f06a";  /* Font Awesome exclamation-circle icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 0.4rem;
}

.alert-item .alert-severity.severity-low {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--color-risk-low);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-item .alert-severity.severity-low::before {
    content: "\f05a";  /* Font Awesome info-circle icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 0.4rem;
}

.alert-item .alert-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--color-text-primary);
}

.alert-item .alert-content {
    padding: 1.5rem;
}

.alert-item .alert-areas {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: white;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 0.75rem 1rem;
    border-radius: 6px;
}

.alert-item.severity-high .alert-areas {
    border-left-color: var(--color-risk-extreme);
}

.alert-item.severity-medium .alert-areas {
    border-left-color: var(--color-risk-high);
}

.alert-item.severity-low .alert-areas {
    border-left-color: var(--color-risk-low);
}

.alert-item .alert-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0;
    color: var(--color-text-secondary);
}

.alert-item .alert-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.alert-item .alert-expiry {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
}

.alert-item .alert-expiry::before {
    content: "\f017";  /* Font Awesome clock icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 0.5rem;
}

.alert-item .alert-details-button {
    background-color: var(--color-accent);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alert-item .alert-details-button:hover {
    background-color: var(--color-accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.alert-item .alert-details-button::after {
    content: "\f054";  /* Font Awesome chevron-right icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-left: 0.5rem;
    font-size: 1.1rem;
}

.alert-date-range {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.alert-issued, .alert-until {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.alert-issued::before, .alert-until::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 0.5rem;
}

.alert-issued::before {
    content: "\f073"; /* Font Awesome calendar icon */
}

.alert-until::before {
    content: "\f017"; /* Font Awesome clock icon */
}

/* Responsive Styles */
@media (max-width: 768px) {
    .search-input {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
    
    .search-button {
        width: 45px;
        height: 45px;
    }
    
    .current-weather-main {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .current-temp {
        font-size: 3rem;
    }
    
    .weather-icon {
        width: 70px;
        height: 70px;
    }
    
    .current-weather-details {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .radar-container {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .search-section {
        padding: 2rem 0;
    }
    
    .location-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .current-weather-details {
        grid-template-columns: 1fr;
    }
    
    .forecast-container {
        grid-template-columns: 1fr;
    }
    
    .radar-container {
        height: 300px;
    }
}

/* Map container styling */
.map-container {
    height: 500px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

/* Map styles */
.map-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.map-popup {
    max-width: 300px;
}

.map-popup h3 {
    margin-top: 0;
    font-size: 16px;
    color: var(--color-text-primary);
}

.map-popup p {
    margin: 8px 0;
    font-size: 14px;
}

.map-popup.severity-high h3 {
    color: var(--color-risk-extreme);
}

.map-popup.severity-medium h3 {
    color: var(--color-risk-high);
}

.map-popup.severity-low h3 {
    color: var(--color-risk-low);
}

/* Adjust the position of Leaflet's zoom control */
.leaflet-control-zoom {
    margin-top: 20px !important;
}

/* Make attribution less obtrusive */
.leaflet-control-attribution {
    font-size: 10px;
    opacity: 0.7;
}

/* Search Results Styling */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 5px;
}

.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--color-border);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--color-background-hover);
}

/* Make sure the search form has relative positioning for the dropdown */
#searchForm {
    position: relative;
}

/* Radar Controls */
.radar-controls {
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.radar-timestamp {
    font-size: 12px;
    margin-bottom: 5px;
    text-align: center;
    color: #333;
}

.radar-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.radar-button {
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radar-button:hover {
    background: #f0f0f0;
}

.radar-button i {
    font-size: 14px;
    color: #333;
}

/* Radar Header and View Toggle */
.radar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.view-toggle {
    display: flex;
    align-items: center;
}

.toggle-button {
    background-color: var(--color-accent);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.toggle-button:hover {
    background-color: var(--color-accent-dark);
}

/* SPC Outlook Controls */
.map-controls {
    margin-top: 1rem;
    background-color: var(--color-background-card);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.spc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    gap: 0.5rem;
    color: var(--color-text-muted);
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 3px solid var(--color-background-card);
    border-top: 3px solid var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spc-error, .spc-no-data {
    color: var(--color-danger);
    text-align: center;
    padding: 1rem;
    font-weight: 500;
}

.spc-no-data {
    color: var(--color-text-muted);
}

.spc-controls-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.spc-info {
    text-align: center;
    margin-bottom: 0.5rem;
}

.spc-info h3 {
    margin-bottom: 0.25rem;
}

.spc-info p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0;
}

.spc-days, .spc-hazards {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.spc-day-button, .spc-hazard-button {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.spc-day-button:hover, .spc-hazard-button:hover {
    background-color: var(--color-background-hover);
}

.spc-day-button.active, .spc-hazard-button.active {
    background-color: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.spc-legend {
    margin-top: 1rem;
}

.spc-legend h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.spc-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.spc-legend-color {
    width: 20px;
    height: 10px;
    border-radius: 2px;
}

.spc-legend-label {
    font-size: 0.85rem;
}

/* Media Queries for SPC Controls */
@media (min-width: 768px) {
    .spc-controls-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .spc-info {
        grid-column: 1 / -1;
    }
    
    .spc-legend {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .radar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .spc-days, .spc-hazards {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toggle-button {
        width: 100%;
    }
} 