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

body {
    margin: 0;
    background-color: #07071A;
}

.head {
    display: flex;
    justify-content: space-between;
    margin: 30px 80px;
}

.unit-wrapper {
    position: relative;
    display: inline-block;
}

.units {
    display: flex;
    background-color: #2A2A43;
    width: 70px;
    padding: 5px;
    align-items: center;
    height: 20px;
    border-radius: 5px;
    cursor: pointer;
}

.units h6 {
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    margin: 0;
    color: #E6E6F3;
}

.setting {
    scale: 0.7;
    margin-right: 3px;
}

.dropdown {
    scale: 0.7;
    margin-left: 3px;
}

.logo {
    scale: 0.8;
}

.looking {
    font-family: 'Inter', sans-serif;
    color: #fff;
    text-align: center;
    margin-top: 40px;
}

.search {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 60px;
    margin-bottom: 40px;
    position: relative;
}

.search-placeholder {
    display: flex;
    align-items: center;
    height: 30px;
    width: 330px;
    border-radius: 7px;
    border: none;
    padding: 3px;
    background-color: #2A2A43;
}

.search-placeholder input {
    height: 100%;
    width: 100%;
    border: none;
    background-color: #2A2A43;
    color: #E6E6F3;
    font-size: 1rem;
    font-family: "Inter", sans-serif;
    font-weight: 300;
}

.search-placeholder img {
    margin: 0 10px;
}

.search-placeholder input:focus {
    outline: none;
}

.search-placeholder input::placeholder {
    color: #9A9AB3;
}

.search button {
    background-color: #4657D9;
    border: none;
    border-radius: 5px;
    width: 70px;
    font-size: 0.9rem;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    color: #E6E6F3;
}

.section {
    margin: 30px 80px;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 25px;
}

.empty-img {
    background-color: #2A2A43;
    border-radius: 15px;
    width: 100%;
    height: 256.52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.other-info {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
}

.other-info div {
    background-color: #2A2A43;
    width: 100%;
    /* height: 80px; */
    border: 1px solid #60606e;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    padding: 15px;
    gap: 20px;
}

.other-info div h6 {
    margin: 0;
    font-size: 0.8rem;
    color: #E6E6F3;
}

.other-info div p {
    margin: 0;
    color: #E6E6F3;
}

.info h6 {
    color: #E6E6F3;
    font-size: 1rem;
    font-family: "DM Sans", sans-serif;
}

.date {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.date div {
    border: 1px solid #60606e;
    border-radius: 10px;
    width: 100%;
    height: 140px;
    background-color: #2A2A43;
    display: flex;
    justify-content: center;
}

.forecast {
    background-color: #31314B;
    border-radius: 15px;
    padding: 20px;
}

.hourly {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hourly h6 {
    margin: 0;
    color: #E6E6F3;
    font-size: 1rem;
    font-family: "Inter", sans-serif;
}

.day-dropdown-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #3A3A5B;
    padding: 0 5px;
    height: 30px;
    color: #E6E6F3;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    gap: 10px;
    position: relative;
}

.day-dropdown {
    position: absolute;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    background-color: #2A2A43;
    padding: 15px;
    border-radius: 8px;
    width: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* align-items: center; */
    right: 8%;
    z-index: 1000;
    margin-top: 15px;
    gap: 15px;

}

.day-dropdown h4 {
    margin: 0;
    color: #E6E6F3;
    font-family: "DM Sans", sans-serif;
    font-weight: 400;
    cursor: pointer;
}

.time-degree {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.time-degree div {
    background-color: #3A3A5B;
    border-radius: 5px;
    height: 46px;
}

.loading-dots {
    display: flex;
    margin-bottom: 5px;
    gap: 10px;
}

.loading-dots div {
    height: 7px;
    width: 7px;
    background-color: #E6E6F3;
    border-radius: 100%;
    opacity: 1;
    animation: pulse 0.9s infinite ease-in-out;
}

.loading-dots div:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots div:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots div:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

.adjusted-dot {
    margin-top: -2px;
}

.units-dropdown {
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    background-color: #2A2A43;
    position: absolute;
    top: 100%;
    right: 0;
    padding: 8px;
    border-radius: 15px;
    z-index: 999;
    width: 150px;

}

.swith-imperial {
    background-color: #3A3A5B;
    border: 1px solid #E6E6F3;
    height: 40px;
    width: 220px;
    display: flex;
    align-items: center;
    border-radius: 10px;
    cursor: pointer;
}

.swith-imperial h5 {
    margin: 0;
    font-size: 1.2rem;
    font-family: "Inter", sans-serif;
    color: #E6E6F3;
    margin-left: 7px;
}

.units-dropdown h6 {
    font-size: 1rem;
    font-family: "Inter", sans-serif;
    color: #999999;
    margin: 7px 8px;
}

.line {
    height: 1px;
    width: 100%;
    background-color: #3A3A5B;
}

.hide {
    opacity: 0;
}

.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.unit-option {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
}

.unit-option h5 {
    margin: 0;
    color: #E6E6F3;
    font-family: "Inter", sans-serif;
    font-size: 1r em;
}

.unit-option.active {
    background-color: #3A3A5B;
}

.hide {
    display: none;
}

.empty-img h6 {
    margin: 0;
}

#empty-img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#search-dropdown {
    position: absolute;
    top: 100%;
    left: 33%;
    width: 335px;
    background-color: #2A2A43;
    border-radius: 10px;
    margin-top: 5px;
    padding: 7px 0;
    z-index: 1000;
    color: #E6E6F3;
}

.search-item {
    padding: 12px 15px;
    cursor: pointer;
    font-family: "Inter", sans-serif;
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.hidden {
    display: none !important;
}

.weather-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(images/bg-today-large.svg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.weather-bg h4 {
    position: absolute;
    z-index: 5;
    color: #fff;
    display: flex;
    justify-self: center;
    top: 100px;
}

.sun-temp img {
    height: 100px;
}

.city-date {
    margin-left: 30px;
}

.city-date h3 {
    color: #E6E6F3;
    font-family: "DM Sans", sans-serif;
    font-weight: 700;
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}

.city-date h5 {
    color: #ceced3;
    font-family: "DM Sans", sans-serif;
    font-weight: 500;
    margin: 0;
    font-size: 1rem;
}

.sun-temp {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.sun-temp h2 {
    margin: 0;
    color: #ceced3;
    font-family: "DM Sans", sans-serif;
    font-style: italic;
    font-weight: 500;
    font-size: 6rem;
}

.sun-temp img {
    margin: 0;
}

#daily-forecast {
    display: flex;
    gap: 12px;
}

.day-card {
    border: 1px solid #60606e;
    border-radius: 10px;
    width: 100%;
    height: 140px;
    background-color: #2A2A43;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.forecast-icon {
    height: 100px;
}

.day-name {
    margin: 15px 0 0 0;
    color: #ceced3;
    font-family: "DM Sans", sans-serif;
    font-weight: 500;
    font-size: 1rem;
}

.temp {
    display: flex;
    gap: 30px;
    color: #ceced3;
    font-family: "DM Sans", sans-serif;
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 5px;
}

.hour-card-div {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 10px;
}

.hour-card-div img {
    height: 40px;
}

.hour-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ceced3;
    font-family: "DM Sans", sans-serif;
    font-weight: 500;
}

.hour-card span {
    margin-right: 15px;
}

.dropdown-dash {
    color: #ceced3;
    font-family: "DM Sans", sans-serif;
}

#day-dropdown div {
    color: #ceced3;
    font-family: "DM Sans", sans-serif;
    cursor: pointer;
    font-size: 0.9rem;
}

.day-option {
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 8px;
}

.day-option:hover {
    background: rgba(255, 255, 255, 0.02);
}

.day-option.active {
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width:767px) {
    body {
        margin: 15px;
    }

    .section {
        display: flex;
        flex-direction: column;
        margin: 0;
    }

    .other-info {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .head {
        margin: 10px 10px 0 0;
    }

    .looking {
        font-size: 2rem;
        margin: 10px 0;
        /* margin: 20px; */
    }

    .search {
        flex-direction: column;
        margin: 20px 0;
    }

    .search-placeholder {
        width: auto;
    }

    .search button {
        width: 100%;
        height: 30px;
        font-size: 1.3rem;
    }

    .other-info div {
        width: auto;
    }

    .date {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    #daily-forecast {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .weather-bg {
        flex-direction: column;
        justify-content: center;
        gap: 35px;
    }
    #search-dropdown{
        left: 0;
        top: 40px;
        width: 100%;
    }
    .city-date{
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}
@media (min-width:768px) and (max-width:1024px){
    .section{
        display: flex;
        flex-direction: column;
    }
    #search-dropdown{
        left: 26%;
        top: 40px;
    }
}
.error-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(
        circle at top,
        #0B0B3B,
        #04041A
    );
    z-index: 9999;

    display: flex;
    justify-content: center;
    align-items: center;
}

.error-content {
    text-align: center;
    max-width: 420px;
    padding: 20px;
}

.error-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.7;
}

.error-content h1 {
    color: #ffffff;
    font-family: "Inter", sans-serif;
    font-size: 2rem;
    margin: 0 0 10px;
}

.error-content p {
    color: #b8b8d4;
    font-family: "Inter", sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
}

.error-content button {
    margin-top: 20px;
    padding: 10px 18px;
    background-color: #2A2A43;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
