/* --- GLOBAL STYLES --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #F0F0F0; 
    background: url('./waukenabo.jpg') no-repeat center center fixed;
    background-size: cover; 
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    min-height: 100vh; 
    overflow-y: auto; 
}

html { height: 100%; }

.content-wrapper {
    background-color: rgba(0, 0, 0, 0.6); 
    padding: 30px;
    margin: 30px 15px; 
    border-radius: 10px;
    max-width: 1000px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px); 
    -webkit-backdrop-filter: blur(5px); 
    flex-grow: 1; 
}

h1 {
    color: #FFCC80; 
    border-bottom: 2px solid #ADD8E6; 
    padding-bottom: 15px;
    font-size: 2.5em;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

h3 { color: #FFDAB9; margin-top: 25px; margin-bottom: 10px; }
summary { font-weight: bold; font-size: 1.6em; padding: 15px 0; cursor: pointer; color: #FFB74D; transition: color 0.3s ease; }
summary:hover { color: #FFECB3; }
table { border-collapse: collapse; width: 100%; margin: 20px 0; background-color: rgba(255, 255, 255, 0.1); border-radius: 5px; overflow: hidden; }
th, td { border: 1px solid rgba(255, 255, 255, 0.2); padding: 12px; text-align: left; }
th { background-color: rgba(240, 240, 240, 0.2); color: #F0F0F0; }

details { 
    margin-bottom: 25px; 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    padding: 0 20px 0 20px; 
    border-radius: 8px; 
    background-color: rgba(0, 0, 0, 0.3); 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); 
}
details[open] summary { border-bottom: 1px solid rgba(255, 255, 255, 0.1); margin-bottom: 15px; }

.intro-text { 
    font-style: italic; 
    margin-bottom: 5px; 
    color: #E0E0E0; 
    font-size: 1.1em; 
}

.intro-description {
    margin-top: 5px;
    margin-bottom: 25px;
    color: #F0F0F0;
}

ul { list-style-type: square; padding-left: 25px; }
a { color: #FFECB3; text-decoration: none; transition: color 0.3s ease; }
a:hover { color: #FFFACD; text-decoration: underline; }
hr { border: none; border-top: 1px solid rgba(255, 255, 255, 0.2); margin: 40px 0; }

/* === WIDGET CONTAINER STYLES === */
.weather-widget-container {
    width: 95%; 
    max-width: 950px; 
    padding: 15px 20px; 
    border-radius: 8px; 
    background-color: rgba(0, 0, 0, 0.3); 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); 
    color: #FFFFFF;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    text-align: left;
    margin: 30px auto 0 auto;
}

/* WIDGET TITLE */
#widget-main-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #FFCC80;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 15px;
    text-align: center
}

/* --- DAILY DISPLAY CONTAINER (Existing content) --- */
#weather-display {
    display: flex;
    align-items: flex-start; 
    justify-content: space-between;
    flex-direction: row; 
}

/* === LEFT SIDE CONTAINER: Holds Current View === */
#current-info-block {
    display: flex;
    align-items: flex-start; 
    margin-right: 20px;
    flex-basis: 50%; 
    flex-grow: 0;
}

/* Current Conditions Group (Icon + Temp/Desc Stack) */
.current-conditions-group {
    display: flex;
    align-items: flex-start;
}

#widget-icon img {
    width: 65px; 
    height: 65px;
}

/* STYLES FOR THE STACKED GROUPING */
.temp-description-stack {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin-left: 10px; 
}

#widget-temp { 
    font-size: 3em; 
    font-weight: 200; 
    line-height: 1; 
}

#widget-description {
    font-size: 0.95em; 
    font-style: italic;
    opacity: 0.8;
    margin-top: 0; 
    margin-left: 0; 
    line-height: 1.2;
}

/* --- WIDGET DETAILS (Right side of current block) --- */
#widget-details {
    width: 170px; 
    margin-left: 20px;
}

.detail-row {
    padding: 2px 0; 
    font-size: 0.8em; 
}

/* === RIGHT SIDE: 5-DAY FORECAST STRIP === */
#widget-forecast {
    display: flex; 
    justify-content: space-around; 
    align-items: flex-start; 
    padding: 0;
    height: 100%;
    margin-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 20px; 
    padding-top: 0; 
    flex-basis: 50%;
}

.forecast-day {
    flex: 1 1 auto; 
    min-width: 80px; 
    text-align: center;
    padding: 0 5px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.forecast-day img {
    width: 30px; 
    height: 30px;
    margin: 2px 0;
}

.forecast-day p {
    margin: 1px 0; 
    font-size: 0.75em; 
    font-weight: bold; 
    line-height: 1.2;
}

.forecast-day .day-label {
    font-weight: 500;
    font-size: 0.7em; 
    margin-bottom: 2px;
    opacity: 0.8; 
}

.temp-separator {
    font-weight: normal;
    opacity: 0.8;
    margin: 0 2px;
}

/* FINAL ATTRIBUTION STYLES */
.weather-attribution {
    font-size: 0.65em; 
    opacity: 0.6; 
    margin-top: 15px; 
    margin-bottom: 0; 
    text-align: center;
}

/* === MOBILE MEDIA QUERIES === */
@media (max-width: 768px) {
    .weather-widget-container {
        width: 100%; 
        padding: 15px 10px; 
        box-sizing: border-box; 
    }

    #weather-display { 
        flex-direction: column; 
        align-items: center; 
        margin-top: 0; 
        min-height: initial; 
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    #current-info-block { 
        width: 100%; 
        margin-right: 0;
        flex-direction: column;
        justify-content: center; 
        margin-bottom: 15px; 
        padding-bottom: 15px; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.3); 
        align-items: center; 
    }
    
    .current-conditions-group {
        flex-direction: row; 
        margin-bottom: 10px;
        align-items: center;
    }
    
    .temp-description-stack {
        align-items: flex-start; 
        margin-left: 15px;
    }
    
    #widget-details { 
        width: 100%; 
        margin: 10px 0; 
        padding: 10px 0; 
        display: flex; 
        justify-content: space-around; 
        margin-left: 0; 
        box-sizing: border-box;
        justify-content: space-between;
    }
    
    #widget-icon img { width: 80px; height: 80px; }
    #widget-temp { font-size: 4em; } 
    #widget-description { margin-left: 0; font-size: 1.1em; }

    #widget-forecast { 
        width: 100%; 
        justify-content: flex-start;
        margin-top: 0; 
        border-left: none; 
        padding-left: 0; 
        padding-top: 0; 
        box-sizing: border-box;
    }
    
    .forecast-day { 
        flex: 1 1 0; 
        min-width: 0; 
        padding: 0 2px;
    } 
    
    table, thead, tbody, th, td, tr { 
        display: block; 
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin: 0 0 1rem 0;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 5px;
        overflow: hidden;
    }

    td {
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
        padding-left: 50%;
        text-align: right;
        font-size: 0.9em;
    }
    
    td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%; 
        padding-left: 10px;
        font-weight: bold;
        text-align: left;
        color: #FFECB3;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .content-wrapper { width: 95vw; max-width: 95vw; margin: 20px auto; padding: 15px; }
    #widget-details { flex-wrap: wrap; justify-content: space-between; }
    .detail-row { flex: 0 0 50%; text-align: center; }
}