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

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

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(#3b82f6, #4a7bff);
}

/* clears the ‘X’ from Chrome */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration { display: none; }

#container {
    background-color: #f0f8ff;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2);
}

#search {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #bdbdbd;
    border-radius: 10px;
    padding: 4px 12px;
}

#search input {
    border: none;
    background-color: transparent;
    font-size: 16px;
    width: 100%;
}

#search input:not(:placeholder-shown) {
    background-color: transparent;
}

#search input:focus-visible {
    outline: none;
}

#search button {
    background-color: transparent;
    border: none;
    cursor: pointer;
}

#weather {
    display: none;
    margin-top: 20px;
}

#weather.show {
    display: block;
}

#weather #title {
    text-align: center;
    margin-bottom: 5px;
    font-weight: 600;
    color: #372f3f;
}

#temp {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(90deg, #5a7cdc, #606dbe);
    color: #fff;
    border-radius: 20px;
    padding: 20px;
}

#temp img {
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.4));
}

#temp-value {
    font-weight: bold;
    font-size: 50px;
    line-height: 55px;
}

#temp-description {
    font-weight: 500;
    text-transform: capitalize;
}

#other-infos {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

#other-infos .info {
    display: flex;
    align-items: center;
    justify-content: start;
    padding: 4px 10px;
    border-radius: 8px;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
    gap: 10px;
    transition: background-color 0.3s ease;
}

#other-infos .info h2 {
    font-size: 12px;
    font-weight: 600;
}

#other-infos .info i {
    text-align: center;
    font-size: 20px;
    width: 20%;
}

#temp-max-icon {
    color: #7f1d1d;
}

#temp-min-icon {
    color: #0284c7;
}

#humidity-icon {
    color: #0ea5e9;
}

#wind-icon {
    color: #7c3aed;
}

.info:hover * {
    color: #fff !important;
    transition: color 0.3s ease;
}

.temp-max-info:hover {
    background-color: #7f1d1d; 
}

.temp-min-info:hover {
    background-color: #0284c7;
}

.temp-humidity-info:hover {
    background-color: #0ea5e9;
}

.temp-wind-info:hover {
    background-color: #7c3aed;
}

#alert {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#alert img {
    width: 200px;
    margin-top: 20px;
}