::selection {
    background-color: gray;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Noto Sans Mono", monospace;
    font-optical-sizing: auto;
    font-weight: bold;
    font-style: normal;
    font-variation-settings: "wdth" 100;
}

html {
    height: 100%;
}

.normal-body {
    background: linear-gradient(135deg, #0f2027, #172a33);
    margin: 0;
    position: relative;
}

.legal-body {
    margin: 1rem;
    position: relative;

    font-weight: lighter;
}

.legal-body a {
    color: black;
    font-weight: bold;
}

.nav-bar {
    background-color: black;
    height: 4vh; 
    font-size: 2vh;
    margin: 2vw;
    border-radius: 2vw;
    padding: 0.5vh 10vw;
    
    display: flex;

    flex-direction: row;
    justify-content: space-between;

    /* align-items: center; */


}

.heading {
    margin-top: 5rem;
    color: white;
    text-align: center;
    letter-spacing: 2px;
}

.heading-black {
    margin-top: 5rem;
    color: black;
    text-align: center;
    letter-spacing: 2px;
    /* text-decoration: underline; */
}

#forecast-heading {
    text-decoration: underline;
}

#bg-video {
    width: 100%;
    opacity: 75%;

    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    z-index: -999;
}

footer {
    /* position: fixed; */
    left: 0;
    bottom: 0; 
    width: 100%;
    height: 150px;
    background: black;
    color: white;
    padding: 20px;
    margin-top: 50vh;

    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

footer a {
    width: 100px;
}

footer a img {
    width: 80px;
}

a {
    color: white;
    text-decoration: none;
}

.hidden {
    display: none;
}

#weather {
    margin-top: 2rem;
    text-align: center;
}

#loading {
    text-align: center;
    padding: 2rem 0;
    font-size: 1.2rem;
}

.hidden {
    display: none;
}

#show-detailed {
    background-color: black;
    color: white;
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-radius: 2rem;
    padding: 0.75rem 2.5rem;
    font-size: 1rem;
    border: none;
}

#show-detailed:hover {
    opacity: 80%;
    cursor: pointer;
}

sup {
    color: rgba(0, 0, 0, 0.68);
}

#forecast {
    width: 50%;
    margin: 0 auto;
    margin-top: 3rem;

    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    justify-items: center;
    justify-content: center;
    gap: 1rem;
}

.fc-day {
    border: 2px solid black;
    border-radius: 1rem;
    padding: 1rem;
    background-color: grey;
    opacity: 80%;

    width: 12pc;
}

.fc-day:hover {
    background-color: black;
    opacity: 100%;
    cursor: pointer;
    color: white;
    border: 2px solid white;
}

#detailed-fc-container {
    grid-column: span 3;
    justify-self: center;
    width: 100%;
}

.detailed-fc {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 2rem;
    width: 100%;
}

#curr-temp {
    font-size: 4rem;
}

#curr-condition {
    width: 150px;
}

#wthr-warning-banner {
    width: 98%;
    margin: 1rem auto;
    padding: 1rem 2rem;
    color: white;
    background-color: red;
    border: 2px solid black;
    border-radius: 2rem;
    text-align: center;
}

#wthr-warning-banner div {
    font-size: x-large;
}

.underconstruction {
    width: 100%;
    margin: 2rem auto;
    text-align: center;
    /* color: blue; */
    background-color: yellow;
    height: 50px;
    font-size: xx-large;
}

#locations {
    background-color: black;
    opacity: 80%;
    width: 98%;
    margin: 1rem auto;
    border-radius: 1rem;
    padding: 2rem 4rem;

    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
    justify-items: center;

}

.location-btn {
    color: black;
    background-color: gray;
    border: 2px solid black;
    border-radius: 1rem;
    width: 100%;
    padding: 1rem 2rem;
    opacity: 100%;
    font-size: x-large;
}

.location-btn:hover {
    border: 2px solid white;
    background-color: black;
    color: white;
    opacity: 100%;
    cursor: pointer;
}

#location-kaindorf {
    grid-column: span 2;
}

#location-ahbwildon {
    grid-column: span 2;
}

/* Weather Warning Styles */
.warning-summary {
    cursor: pointer;
    font-size: x-large;
}

.warning-summary:hover {
    opacity: 100%;
}

.warning-badge {
    display: inline-block;
    margin-left: 1rem;
    font-size: large;
}

.warning-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.warning-modal.hidden {
    display: none;
}

.warning-modal-content {
    background: white;
    color: black;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid black;
}

.warning-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: black;
    padding: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.warning-modal-close:hover {
    opacity: 70%;
}

.warning-details-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.warning-item {
    border-left: 3px solid black;
    padding: 1.5rem;
    background: #f5f5f5;
    border-radius: 0.5rem;
}

.warning-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.warning-type {
    font-size: 1.1rem;
    font-weight: bold;
    color: black;
}

.warning-time {
    font-size: 0.9rem;
    color: black;
    white-space: nowrap;
    background: grey;
    padding: 0.3rem 0.8rem;
    border-radius: 0.3rem;
    opacity: 80%;
}

.warning-description {
    margin-bottom: 1rem;
    color: black;
    line-height: 1.5;
    font-size: 0.95rem;
}

.warning-section {
    margin-top: 1rem;
}

.warning-section-title {
    font-weight: bold;
    color: black;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.warning-section-content {
    color: black;
    line-height: 1.5;
    font-size: 0.9rem;
    white-space: pre-line;
}

/* ===== TABLET (768px - 1024px) ===== */
@media (max-width: 1024px) {
    .nav-bar {
        height: 5vh;
        margin: 1.5vw;
        padding: 0.5vh 5vw;
        font-size: 1.8vh;
    }

    #curr-temp {
        font-size: 3rem;
    }

    #curr-condition {
        width: 120px;
    }

    #forecast {
        width: 80%;
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .fc-day {
        width: 100%;
        padding: 0.8rem;
    }

    #detailed-fc-container {
        grid-column: span 2;
    }

    #locations {
        grid-template-columns: 1fr 1fr;
        padding: 1.5rem 2rem;
        gap: 0.8rem;
    }

    .location-btn {
        font-size: large;
        padding: 0.75rem 1.5rem;
    }

    #location-kaindorf {
        grid-column: span 2;
    }

    #location-ahbwildon {
        grid-column: span 2;
    }

    footer {
        height: auto;
        flex-wrap: wrap;
        padding: 1rem;
        gap: 1rem;
    }

    footer a {
        width: 80px;
    }

    footer a img {
        width: 60px;
    }
}

/* ===== MOBILE (max 768px) ===== */
@media (max-width: 768px) {
    * {
        font-size: 14px;
    }

    .nav-bar {
        height: 6vh;
        margin: 1rem;
        padding: 0.5vh 2vw;
        font-size: 1.4vh;
        border-radius: 1rem;
    }

    .nav-bar-lnk {
        font-size: 1rem;
    }

    .heading-black,
    .heading {
        margin-top: 2rem;
        font-size: 1.3rem;
    }

    #forecast-heading {
        margin-top: 2rem;
    }

    #curr-temp {
        font-size: 2.5rem;
    }

    #curr-condition {
        width: 100px;
    }

    #show-detailed {
        margin-top: 0.8rem;
        margin-bottom: 0.8rem;
        padding: 0.6rem 2rem;
        font-size: 0.9rem;
    }

    #forecast {
        width: 95%;
        grid-template-columns: 1fr;
        gap: 0.6rem;
        margin-top: 1.5rem;
    }

    .fc-day {
        width: 100%;
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    #detailed-fc-container {
        grid-column: span 1;
    }

    .detailed-fc {
        flex-direction: column;
        gap: 0.5rem;
    }

    .detailed-fc div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 0.5rem;
        background-color: rgba(128, 128, 128, 0.3);
        border-radius: 0.5rem;
    }

    .detailed-fc img {
        width: 50px;
        height: 50px;
    }

    #locations {
        width: 97%;
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 0.6rem;
        margin: 1rem auto;
    }

    .location-btn {
        font-size: 1rem;
        padding: 0.8rem 1rem;
        width: 100%;
    }

    #location-kaindorf {
        grid-column: span 1;
    }

    #location-ahbwildon {
        grid-column: span 1;
    }

    #wthr-warning-banner {
        width: 95%;
        margin: 0.8rem auto;
        padding: 0.8rem 1rem;
        border-radius: 1rem;
        font-size: 0.9rem;
    }

    #wthr-warning-banner div {
        font-size: large;
    }

    footer {
        height: auto;
        margin-top: 20vh;
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        justify-content: center;
    }

    footer a {
        width: 70px;
    }

    footer a img {
        width: 50px;
    }

    #detailed {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    sup {
        font-size: 0.8rem;
    }
}