@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&display=swap');

:root{
    --main-color: #43affc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("icons/Background.jpg");
    overflow-y: hidden;
    background-color: var(--main-color);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    backdrop-filter: blur(20px);
}

.wrapper {
    background-color: #fff;
    width: 25rem;
    box-shadow:
        0 2.8px 2.2px rgba(0, 0, 0, 0.034),
        0 6.7px 5.3px rgba(0, 0, 0, 0.048),
        0 12.5px 10px rgba(0, 0, 0, 0.06),
        0 22.3px 17.9px rgba(0, 0, 0, 0.072),
        0 41.8px 33.4px rgba(0, 0, 0, 0.086),
        0 100px 80px rgba(0, 0, 0, 0.12);
    border-radius: 5px;
}

.wrapper header {
    color: var(--main-color);
    font-size: 1.2em;
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: .8em .8em;
    border-bottom: 1px solid #bfbfbf;
}

header i {
    cursor: pointer;
    font-size: 0em;
    margin-right: .4em;
}

.wrapper.active header i {
    font-size: 1.3em;
    margin-left: .3em;
}

.wrapper .input-part {
    margin: 1em 2em 1.5em;
}

.wrapper.active .input-part {
    display: none;
}

.input-part .info-txt {
    display: none;
    font-size: 1em;
    text-align: center;
    padding: .8em .7em;
    border-radius: 7px;
    margin-bottom: .9em;
}

.info-txt.error {
    display: block;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.info-txt.pending {
    display: block;
    color: #0c5460;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
}

.input-part :where(input, button) {
    width: 100%;
    height: 3.4em;
    border: none;
    outline: none;
    font-size: .9em;
    border-radius: 7px;
}

.input-part input {
    border: 1px solid #bfbfbf;
    text-align: center;
}

.input-part input:is(:focus, :valid) {
    border: 2px solid var(--main-color);
}

.input-part .separator {
    height: 1px;
    width: 100%;
    background-color: #ccc;
    margin: 1.2em 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.separator::before {
    content: "or";
    font-size: 1em;
    color: #ccc;
    padding: 0 .8em;
    background-color: #fff;
}

.input-part button {
    color: #fff;
    background-color: var(--main-color);
    cursor: pointer;
}

/* Weather */
.wrapper .weather-part {
    margin: 2em 0 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.wrapper.active .weather-part {
    display: flex;
}

.weather-part img {
    max-width: 6em;
}

.weather-part .temp {
    display: flex;
    font-size: 4em;
    font-weight: 500;
}

.weather-part .temp .numb {
    font-weight: 600;
}

.weather-part .temp .deg {
    font-size: .6em;
    margin: .2em .1em;
    display: block;
}

.weather-part .weather {
    font-size: 1.2em;
    text-align: center;
    margin: -.5em 1.3em .8em;
}

.weather-part .location {
    display: flex;
    align-items: center;
    font-size: 1.1em;
    margin-bottom: 1.3em;
}

.location i {
    font-size: 1em;
    margin-right: .5em;
    color: var(--main-color);
}

.weather-part .bottom-details {
    width: 100%;
    display: flex;
    align-items: center;
    border-top: 1px solid #bfbfbf;
    justify-content: space-between;
}

.bottom-details .column {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 1em 0;
    justify-content: center;
}

.column i {
    font-size: 2.2em;
    color: var(--main-color);
}

.column.humidity {
    border-left: 1px solid #bfbfbf;
}

.details .temp,
.humidity span {
    font-size: 1em;
    font-weight: 500;
    margin-top: -.1em;
    margin-left: .6em;
}

.details .temp .deg {
    margin: 0;
    font-size: 1em;
    padding: 0 .2em 0 .1em;
}

.details p {
    font-size: .8em;
    margin: -.3em 0 0 .8em;
}

@media  screen and (max-width: 420px) {
    body{
        max-height: 100vh;
    }
    .wrapper {
        width: 19rem;
    }
}