* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: NeueHaasGroteskText, Arial, sans-serif;
    font-weight: 700;
}

body {
    transition: background-color 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: hsl(0, 0%, 100%);
}

p {
    font-size: 1.8rem;
    margin-right: 1rem;
}

.weather-widget {
    min-width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.flex-container {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    padding: 0.2rem;
    margin-bottom: 0.5rem;
}

.weather-header {
    border-bottom: #000 solid 0.2rem;
    position: relative;
}

#location {
    font-size: 6rem;
    padding: 0.2rem;
    margin-bottom: 0.5rem;
    border-bottom: #000 solid 0.2rem;
    text-transform: capitalize;
}

.weather-header:hover #location-country {
    transition: 1s ease;
    opacity: 1;
}

#location-country {
    position: absolute;
    opacity: 0;
    transition: 0.7s ease;
    font-size: 2rem;
    top: -1rem;
    right: 0;
}

#time {
    font-size: 2rem;
}

.weather-data {
    opacity: 1;
    margin: 1rem 0;
    border-bottom: #000 solid 0.2rem;
    transition: 1s ease;
}

.weather-data .flex-container > p:nth-child(even) {
    font-size: 3rem;
    font-weight: 700;
    margin-right: 0;
}

#refresh {
    width: 8rem;
    background: transparent;
    border: 1px solid #000;
    border-radius: 0.3rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#refresh:hover {
    color: #c00;
}

#inputCity {
    padding: 0.5rem;
    border: 1px solid #000;
    border-radius: 0.3rem;
    max-width: 8rem;
    background: transparent;
    margin-bottom: 1rem;
}

.flex-container label {
    position: relative;
}

.error-popup {
    position: absolute;
    min-width: max-content;
    font-size: 1rem;
    color: #c00;
    top: 2.5rem;
    left: 0;
}

@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

    .weather-widget {
        min-width: 100%;
    }

    #location {
        font-size: 4rem;
    }

    #location-country {
        position: static;
        opacity: 1;
        font-size: 1.5rem;
    }

    .flex-container {
        flex-direction: column;
        align-items: flex-start;
    }

    #time {
        font-size: 1.5rem;
    }

    p {
        font-size: 1.2rem;
    }

    .weather-data .flex-container > p:nth-child(even) {
        font-size: 2rem;
    }

    .error-popup {
        top : 6rem;
    }
}