:root {
    --font-family: "Montserrat", sans-serif;

}

html {
    font-size: 16px;
    box-sizing: border-box;
    font-family: var(--font-family);
}

*,
::after,
::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
}

a {
    text-decoration: none;
}


.h2-title {
    font-size: 3rem;
}

.h3-title {
    font-size: 2.5rem;
}

.text28 {
    font-size: 1.75rem;
    font-weight: 500;
}

.text24 {
    font-size: 1.5rem;
    font-weight: 600;
}

.text18 {
    font-size: 1.125rem;
    font-weight: 500;
}

.text14 {
    font-size: 0.875rem;
}

body {
    width: 100%;
    background-image: url('../img/bg.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    color: #fff;
}

main {
    display: block;
    width: 100%;
    background-color: rgba(0, 170, 255, 0.2);
    transition: all 0.3s ease-in-out;
    backdrop-filter: blur(10px);
}

body.pink main {
    background: rgba(255, 58, 61, 0.2);
}

body.dark main {
    background: rgba(0, 1, 27, 0.7);
}

body.dark.pink main {
    background: rgba(27, 0, 0, 0.7);
}

body.switch-dark main {
    background: rgba(0, 1, 27, 0.7) !important;
}

body.switch-dark.pink main {
    background: rgba(27, 0, 0, 0.7) !important;
}

body.switch-light main {
    background: rgba(0, 170, 255, 0.2) !important;
}

body.switch-light.pink main {
    background: rgba(255, 58, 61, 0.2) !important;
}


.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    max-width: 1152px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 6rem 2rem 2rem;
}

.content {
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    gap: 2rem;
    width: calc(50% - 1rem);
    height: 46.5rem;
    border-radius: 0.75rem;
    padding: 1.75rem;
    backdrop-filter: blur(100px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(0, 83, 124, 0.15) 100%);
}

.weather__content {
    justify-content: space-between;
}

.content__form {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    position: relative;
}

.form__input {
    width: 100%;
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem;
    border: none;
    outline: none;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: none;
    outline: none;
    background-color: #0f0;
    transition: all 0.2s ease-out;
    cursor: pointer;
}

.btn:hover {
    background-color: #0c0;
}

.form__btn {
    width: 4.72rem;
}

/* Error Message */

.error-message {
    width: 100%;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    color: #D90000;
    background-color: #FEEAED;
    position: absolute;
    left: 0;
    bottom: -1.75rem;
}

.tasks-list {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
}

.tasks-list::-webkit-scrollbar {
    width: 0.5rem;
    margin-left: 0.5rem;
}

.tasks-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    margin-left: 0.5rem;
}

.tasks-list::-webkit-scrollbar-thumb {
    background: #fff;
    border-radius: 0.5rem;
}

.task-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease-out;
    position: relative;
    overflow: hidden;
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.25);
    ;
}

.task-item__content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.task-item__btn-wrapper {
    display: flex;
    gap: 0.75rem;
}

.task-item__delete-btn {
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    outline: none;
    background: none;
    cursor: pointer;
}

.task-item__delete-btn svg {
    display: block;
    margin: auto;
    width: 100%;
    height: 100%;
}

.task-item__delete-btn svg path {
    transition: all 0.2s ease-out;
}

.task-item__delete-btn:hover svg path {
    stroke: #C00000;
}

.task-item__checkbox {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    position: relative;
    cursor: pointer;
}

.task-item__checkbox-input {
    display: block;
    appearance: none;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #0f0;
    border-radius: 100%;
    position: absolute;
    z-index: -1;
    transition: all 0.2s ease-out;
}

.task-item__checkbox-input:hover {
    border-color: #0c0;
}

.task-item__checkbox-custom {
    display: block;
    width: 0;
    height: 0;
    background-image: url(../img/check-icon.svg);
    background-repeat: none;
    z-index: 1;
    transition: all 0.4s ease-out;
}

.task-item__checkbox-input:checked+.task-item__checkbox-custom {
    width: 1.5rem;
    height: 1.5rem;
}

.todo-list__time-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 1.75rem 1.75rem 0.5rem;
    margin: -1.75rem -1.75rem 0 -1.75rem;
    height: 12.5rem;
    position: relative;
    flex-shrink: 0;
}

.todo-list__photo-bg {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: right;
    border-radius: 0.75rem 0.75rem 0 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: -2;
}

.todo-list__time-block::after {
    content: '';
    display: block;
    width: 100%;
    height: 50%;
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5));
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: -1;
}

/* List is empty */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
    height: 100%;
    overflow-y: hidden;
}

.empty-state__img {
    width: 15rem;
    height: auto;
}

.empty-state .text18 {
    max-width: 20rem;
}

.empty-state--hidden {
    display: none;
}

.weather__empty-state .empty-state__img {
    width: 100%;
    max-width: 29.5rem;
}

/* POPUP */

.task-item__popup {
    max-width: 16.25rem;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    border-radius: 0.65rem;
    transition: all 0.6s cubic-bezier(0.8, 1.5, 0.22, 0.8);
    will-change: max-width;
}

.popup__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    height: 100%;
    width: 100%;
    border-radius: 0.65rem;
    background-color: #ffffff;
}

.popup__btn {
    flex-shrink: 0;
    border-radius: 0.5rem;
    border: none;
    outline: none;
    height: 100%;
    padding: 0 0.75rem;
    transition: all 0.2s ease-out;
}

.popup__btn svg {
    display: block;
}

.popup__cancel-btn {
    background-color: #9B9B9B;
}

.popup__cancel-btn:hover {
    background-color: #737373;
}

.popup__delete-btn {
    background-color: #FF4545;
}

.popup__delete-btn:hover {
    background-color: #D90000;
}

.popup__question-text {
    flex-shrink: 0;
    max-width: 8.75rem;
    text-align: center;
    color: #737373;
}

.task-item__popup--hidden {
    max-width: 0;
    visibility: hidden;
}

/* WEATHER */

.weather__info {
    display: none;
    justify-content: flex-start;
    flex-direction: column;
    gap: 2rem;
}

.weather__city-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.375rem;
}

.weather__city-wrapper svg {
    flex-shrink: 0;
}

.weather__current-city {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.weather__delete-city {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    margin-left: auto;
}

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

.weather__icon-now {
    min-width: 0;
    max-width: 14rem;
    max-height: 14rem;
    object-fit: contain;
}

.weather__temp-wrapper {
    text-align: right;
}

.weather__main-now {
    text-transform: capitalize;
}

.weather__temp-now {
    white-space: nowrap;
}

.weather__properties {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.weather__property {
    width: 50%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.weather__property svg {
    display: block;
}

.humidity__property-value,
.wind-speed__property-value {
    font-weight: 700;
}

.weather__list {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    overflow-y: auto;
    padding-bottom: 0.5rem;
}

.weather__list::-webkit-scrollbar {
    height: 0.5rem !important;
}

.weather__list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 0.5rem !important;
}

.weather__list::-webkit-scrollbar-thumb {
    background: #fff !important;
    border-radius: 0.5rem !important;
}

.weather__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem;
    min-width: 9.275rem;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease-out;
    cursor: pointer;
}

.weather__item:hover {
    background: rgba(255, 255, 255, 0.25);
    ;
}

.weather__item-icon {
    height: 7.5rem;
}

.weather__item-temp {
    font-weight: 700;
}

.weather__item-temp--min {
    font-weight: 300;
}

/* SWITCH */

.switch {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.switch__input {
    display: none;
}

.switch__span {
    display: block;
    width: 5rem;
    height: 2rem;
    border-radius: 2rem;
    background: url('../img/switch-bg.svg') right center / cover no-repeat,
        linear-gradient(35deg, #b0def2 0%, #1991cc 100%);
    box-shadow: inset -0px 1px 3px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    transition: transform 0.6s cubic-bezier(0.8, 1.5, 0.22, 0.8),
        background-position 0.6s cubic-bezier(0.8, 1.5, 0.22, 0.8);
}

.switch__span::before,
.switch__span::after {
    content: '';
    display: block;
    width: 1.625rem;
    height: 1.625rem;
    background: linear-gradient(145deg, #fff500 0%, #ffc700 100%);
    box-shadow: 0px 0px 1.75px 1.5px rgba(255, 223, 0, 0.6);
    border-radius: 100%;
    position: absolute;
    top: 0.1875rem;
    left: 0.1875rem;
    z-index: 10;
    transition: transform 0.6s cubic-bezier(0.8, 1.5, 0.22, 0.8);
    opacity: 1;
}

.switch__span::after {
    background-image: url('../img/switch-moon.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0px 0px 1.75px 1.5px rgba(255, 255, 255, 0.6);
    opacity: 0;
}

.switch__input:checked+.switch__span {
    background: url('../img/switch-bg.svg') left center / cover no-repeat,
        linear-gradient(35deg, #041326 0%, #0e314c 100%);
}

.switch__input:checked+.switch__span::after,
.switch__input:checked+.switch__span::before {
    transform: translateX(3rem);
    opacity: 0;
}

.switch__input:checked+.switch__span::after {
    opacity: 1;
}

/*PRELOADER */

.preloader {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease-in;
    overflow: hidden;
}

.preloader.fade-out {
    transform: translateY(-100%);
    pointer-events: none;
}

.preloader__items-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    height: 450%;
    transform: rotate(-45deg);
    position: relative;
    transition: transform 1s linear;
}

.preloader__bg-item {
    width: 300%;
    height: 50%;
}

.preloader__bg-item--top {
    background: #6ED1FF;
}

.preloader__bg-item--bottom {
    background: #FFFBD9;
    transform: translateY(-1.5px);
}

.preloader__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.preloader__items-wrapper svg {
    width: 22rem;
    height: auto;
    overflow: visible;
}

.preloader__text {
    font-weight: 600;
    background: linear-gradient(90deg, #BD1C00, #E36001);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    width: 100%;
    text-align: center;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.preloader__text span {
    letter-spacing: 0.125rem;
}

@media (max-height: 54.5rem) {

    .switch {
        top: 1rem;
    }

    .container {
        padding: 4rem 1rem 1rem;
        gap: 1rem;
    }

}

@media (max-width: 1151px),
(max-height: 51.5rem) {

    .container {
        flex-direction: column;
        padding: 4rem 1rem 1rem;
        gap: 1rem;
    }

    .content {
        max-width: 46rem;
        width: 100%;
    }

    .switch {
        top: 1rem;
    }
}

@media (max-width: 767px) {

    .h3-title {
        font-size: 2rem;
    }

    .text28 {
        font-size: 1.5rem;
    }

    .container {
        padding: 4rem 0.75rem 0.75rem;
        gap: 0.75rem;
    }

    .content {
        padding: 1rem;
        height: auto;
        min-height: 46.5rem;
        gap: 1.5rem;
    }

    .weather__content {
        min-height: initial;
    }

    .weather__info {
        gap: 1.5rem;
    }

    .todo-list__time-block {
        margin: -1rem -1rem 0 -1rem;
        padding: 1rem 1rem 0.5rem;
    }

    .svg-icon {
        max-width: 2rem;
        height: auto;
    }

}