/*
    Landon Hansen
    5/1/2024
    Using the Fetch API
*/

body {
    /* font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; */
    /* font-family: "Noto Sans", sans-serif; */
    font-family: "Poppins", sans-serif;

    --background-color: rgba(246,247,252);
    --card-color: white;
    --accent-color: #1d91ff;
    --divider-color: #f1f1f1;
    --font-color: black;

    background-color: var(--background-color);

    font-size: 1.1rem;

    padding: 0;
    margin: 0;
}

* {
    transition: opacity 150ms;
}

main {
    max-width: 920px;
    margin: auto;

    padding: 5px;
    box-sizing: border-box;
    min-height: 100vh;

    background-color: var(--card-color);
}

.weather-data-wrapper {
    transition: opacity 1s;
}

.weather-out {
    max-width: 700px;
    margin: auto;
}

.weather-out > div {
    display: grid;
    
    padding: 10px;  
    grid-template-columns: 150px 1fr 150px;
    grid-template-rows: 100px;
}

.weather-out > div > * {
    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;

    box-sizing: border-box;
}

.weather-data-icon {
    /* background-color: var(--divider-color);
    border-radius: 100%; */

    font-size: 3em;
    text-align: center;
}

.weather-summary {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
}

.weather-summary > *:not(#weather-image) {
    z-index: 10;
    position: relative;
}

/* #weather-image {
    position: absolute;

    width: 150px;
    height: 150px;

    left: 50%;
    top: 50%;
    
    object-fit: contain;

    transform: translate(-50%, -50%);
} */

.weather-header {
    display: grid;

    max-width: 500px;
    margin: auto;

    grid-template-columns: 100px 1fr 100px;
    grid-template-rows: 1fr;
}

#status-header.error {
    color: red;
}

#status-header {
    margin-bottom: 20px;
}

#weather-image.show {
    border-radius: 100%;
    /* background-color: lightgray; */
    background-color: #1d91ff;

    width: 100px;
    height: 100px;

    /* border: 2px solid #1d91ff; */
    /* border: 5px solid var(--divider-color); */
    border: 2px solid lightgray;
}

#temperature {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
}

#description {
    display: block;
    font-weight: normal;
    line-height: 1em;
}

#sunlocation {
    position: relative;

    border: 2px solid lightgray;
    /* background-color: #1d91ff; */
    border-radius: 100%;

    width: 100%;
    height: 100%;
}

.sunlocation-wrapper {
    position: relative;
    width: 100px;
    height: 100px;

    display: flex;
    align-items: center;
    justify-content: center;
}

#sunlocation-text {
    /* position: absolute;

    bottom: -2rem;
    left: 50%; */

    white-space: nowrap;

    font-size: 1rem;

    /* transform: translateX(-50%); */
}