/* ===== Custom 7-Day Forecast Styles ===== */

#seven-day-forecast {
    display: inline-flex;
    gap: 12px;
    margin-top: 12px;
    overflow: visible;
}

.forecast-tombstone {
    flex: 0 0 68px;
    text-align: center;
    background-color: transparent;
    border: none;
    position: relative;
    display: flex;
    flex-direction: column;
}

.forecast-tombstone:first-child {
    flex: 0 0 90px;
}

.forecast-tombstone:last-child {
    border-right: none;
}

/* Hazard active tombstone */
.forecast-tombstone.hazard-active {
    background-color: #ff0000;
    color: white;
    border-color: #940101;
}

.forecast-tombstone.hazard-active .period-name,
.forecast-tombstone.hazard-active .desc {
    color: white;
}

.forecast-tombstone.hazard-active .temp-high {
    color: #ffcccc;
}

.forecast-tombstone.hazard-active .forecast-icon {
    filter: brightness(1.2);
}

/* Period name */
.period-name {
    font-size: 11px;
    font-weight: bold;
    padding: 6px 4px 3px;
    color: #000;
    line-height: 1.15;
    height: 30px;
    overflow: hidden;
}

.forecast-tombstone.hazard-active .period-name {
    border-bottom: none;
}

/* Forecast icon */
.forecast-icon {
    width: 86px;
    height: 86px;
    margin: 0 auto;
    display: block;
    margin-bottom: 2px;
}

/* Hazard label on active hazard tombstone */
.hazard-label {
    font-size: 10px;
    font-weight: bold;
    padding: 2px 4px;
    background-color: rgba(0,0,0,0.2);
    margin: 3px 6px;
    border-radius: 2px;
}

/* Temperature */
.temp {
    font-size: 12px;
    font-weight: bold;
    padding: 3px 6px;
    white-space: nowrap;
}

.temp-high {
    color: #ef3725;
}

.forecast-tombstone.hazard-active .temp-high {
    color: #ffcccc;
}

.temp-low {
    color: #15a3e0;
}

/* Description */
.desc {
    font-size: 11px;
    padding: 2px 4px;
    line-height: 1.15;
    text-align: center;
}

.forecast-tombstone.hazard-active .desc {
    color: white;
}

/* ===== Tooltip ===== */
.forecast-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.35;
    width: max-content;
    max-width: 260px;
    z-index: 999;
    text-align: left;
    white-space: normal;
    pointer-events: none;
}

.forecast-tooltip::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #333;
}

.forecast-tombstone:hover .forecast-tooltip {
    display: block;
}

/* ===== Hazard Banner ===== */
.hazards-banner {
    margin-bottom: 12px;
    border: 1px solid #ebccd1;
    border-radius: 4px;
    overflow: hidden;
}

.hazards-header {
    background-color: #f2dede;
    color: #a94442;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: bold;
}

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

.hazards-list li {
    border-top: 1px solid #ebccd1;
}

.hazards-list li:first-child {
    border-top: none;
}

.hazards-list li a {
    display: block;
    padding: 5px 12px;
    color: #a80000;
    text-decoration: underline;
    font-size: 13px;
}

.hazards-list li a:hover {
    background-color: #f2dede;
}

.hazards-detail {
    padding: 5px 12px;
    color: #a80000;
    cursor: pointer;
    font-size: 12px;
    border-top: 1px solid #ebccd1;
    background-color: #fafafa;
}

.hazards-detail.expanded {
    max-height: 200px;
    overflow-y: auto;
}

/* ===== Responsive ===== */
@media screen and (max-width: 680px) {
    .forecast-tombstone {
        flex: 0 0 95px;
        min-height: 220px;
    }
    
    .period-name {
        font-size: 11px;
    }
    
    .forecast-icon {
        width: 72px;
        height: 72px;
    }
}
