@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --primary-color: #4a90e2;
    --primary-color-light: #66a5ed;
    --primary-color-darker: #2e7cd6;
    --hover-color: #b9d1ec;
    --secondary-color: #f4f4f4;
    --text-color: #333;
    --text-light: #5f5f5f;
    --border-color: #dcdcdc;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins';
    background-color: var(--primary-color-light);
    color: var(--text-color);
    min-height: 100vh;
}

header {
    display: flex;
    align-items: center;
    gap: 2rem;
    color: var(--text-color);
    padding: 0 5rem;
    height: 15vh;
}

.logo {
    width: 50px;
    height: auto;
}

.logo-img {
    width: 100%;
    height: auto;
}

.logo-label {
    font-size: 12px;
    font-weight: 600;
}
.logo-label>p {
    font-weight: 400;
    color: var(--secondary-color);
    font-style: italic;
}

.container {
    height: 85vh;
    padding: 5vh 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-container, .weather-form{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-container{
    border: 1px solid var(--border-color);
    box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background-color: #fff;
    padding: 10px 20px;
    height: auto;
    min-height: 480px;
    display: flex;
    flex-direction: column;
}

.weather-form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.current-temp {
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    margin: 20px 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.main-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 400px;
    margin: auto;
    height: 100px;
    background: linear-gradient(to right, var(--primary-color-light), var(--primary-color), var(--primary-color-darker));
    color: #fff;
    border-radius: 12px;
    gap: 10px;
    box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.1);
}

.main-info-ico {
    width: 55px;
    height: auto;
}

.main-info-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 250px;
    height: 100%;
    padding: 0 8px;
}

.weather-form > h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 10px auto;
}

.input-group {
    display: flex;
    align-items: center;
    height: 60px;
    width: 380px;
    gap: 16px;
    position: relative;
    padding: 0 5px;
}

.label-city {
    position: absolute;
    left: 15px;
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
    background-color: #fff;
    padding: 0 5px;
    transition: all .1s ease-in-out;
}

.city-input {
    height: 45px;
    width: 100%;
    padding: 0 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    font-family: var(--font-family);
    color: var(--text-light);
    transition: all .1s;
    position: relative;
    background: transparent;
    z-index: 100;
}

.city-input:focus {
    border: 2px solid var(--primary-color);
}

.city-input:focus + .label-city,
.city-input:not(:placeholder-shown) + .label-city{
    z-index: 100;
    transform: translateY(-23px);
    color: var(--primary-color);
    background-color: #fff;
}

.search-btn {
    min-height: 45px;
    min-width: 45px;
    width: 45px;
    height: 45px;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all .1s ease-in-out;
    flex-shrink: 0;
}

.search-btn>img {
    height: auto;
    width: 70%;
}

.search-btn:hover {
    background-color: var(--primary-color-darker);
}

.divider{
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    margin: 20px 0;
}

.information-container {
    width: 100%;
    flex: 1;
    overflow-y: auto;
    padding: 0 5px;
    min-height: 0;
    margin-bottom: 15px;
}

.information-dual-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    padding: 10px;
    height: 100%;
}

.info-column{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background-color: #fff;
}

.info-column > p{
    font-size: 18px;
    color: var(--text-light);
    margin: 8px auto;
    font-weight: 500;
    border: 2px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all .1s ease-in-out;
    width: 180px;
    height: 50px;
}

.info-column > p:hover{
    background-color: #f8f8f8;
    transform: translate3d(2px, -3px, 5px);
    box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.1);
}

.temperature-ico, .cloud-showers-heavy-ico, .raindrops-ico, .wind-ico{
    height: 20px;
    width: auto;
    margin-right: auto;
}

.error-message {
    width: 300px;
    padding: 16px;
    background-color: #ff3333;
    color: white;
    text-align: center;
    position: fixed;
    top: 0;
    left: 50%;
    border-radius: 8px;
    transform: translate(-50%, -100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.error-message.show {
    transform: translate(-50%, 20px);
    visibility: visible;
    opacity: 1;
}

.information-container::-webkit-scrollbar {
    width: 8px;
}

.information-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.information-container::-webkit-scrollbar-thumb {
    background: var(--primary-color-light);
    border-radius: 4px;
}

.information-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.credits {
    margin-top: auto;
    padding: 10px 0;
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
}

@media (max-width: 900px) {
    header {
        justify-content: center;
        padding: 0 1rem;
    }
}

@media (max-width: 500px) {
    header {
        height: 12vh;
        padding: 0 2rem;
        gap: 1.5rem;
    }

    .container {
        height: 88vh;
        padding: 1vh 0;
    }

    .form-container {
        width: 95%;
        height: auto;
        padding: 15px;
        display: flex;
        flex-direction: column;
    }


    .main-info {
        width: 100%;
        height: auto;
        flex-direction: column;
        padding: 15px;
        margin: 0 auto 15px;
    }

    .information-container {
        flex: 1;
        min-height: 0;
        height: auto;
    }

    .information-dual-column {
        grid-template-columns: 1fr;
        padding: 5px;
        margin-top: 0;
    }

    .credits {
        font-size: 11px;
        padding: 5px 0;
    }

    .weather-form > h2 {
        font-size: 18px;
    }

    .main-info {
        padding: 10px;
        margin: 10px auto;
    }

    .input-group {
        width: 100%;
    }

    .main-info {
        width: 100%;
        height: auto;
        flex-direction: column;
        padding: 15px;
        margin: 0 auto 15px;
    }

    .main-info-ico {
        width: 45px;
    }

    .main-info-text {
        text-align: center;
    }

    .current-temp {
        font-size: 24px;
        margin: 10px 0;
    }

    .weather-form > h2 {
        font-size: 20px;
    }

    .information-dual-column {
        grid-template-columns: 1fr;
        padding: 5px;
    }

    .info-column > p {
        width: 100%;
        font-size: 16px;
        margin: 5px auto;
    }

    .error-message {
        width: 90%;
        font-size: 14px;
    }

    .logo-label {
        font-size: 12px;
    }

    .logo {
        width: 40px;
    }
}

@media (max-width: 350px) {

    .weather-form > h2 {
        font-size: 18px;
    }

    .current-temp {
        font-size: 20px;
    }
}

@media (max-height: 700px) {
    header {
        height: 12vh;
    }

    .container {
        height: 88vh;
        padding: 1vh 0;
    }

    .form-container {
        padding: 10px 15px;
    }

    .information-container {
        height: 200px;
    }
}