@import url(variables.css);

html,
body {
    margin: 0;
    background: hsl(0, 0%, 10%);
    background: url(https://w.wallhaven.cc/full/yq/wallhaven-yq8grx.jpg);
    background-position: center;
    background-size: cover;
    height: 100vh;
    width: 100vw;
}

* {
    color: hsl(0, 0%, 95%);
    box-sizing: border-box;
    z-index: 2;
    user-select: none;
}

.bg {
    /* background: linear-gradient(to right, rgba(71, 85, 105, 0.3) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(71, 85, 105, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    background-size: 32px 32px, 32px 32px, 100% 100%; */
    position: absolute;
    inset: 0;
    z-index: 1;
}

.container {
    /* background: #000; */
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
}


nav {
    width: 40%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.glass {
    text-shadow: 0 0 5px hsla(0, 0%, 0%, 0.5);
    /* box-sizing: content-box; */
    border: 2px solid hsl(0, 0%, 95%, 0.3);
    box-shadow: inset 0px 0px 1rem 0.3rem hsla(0, 0%, 100%, 0.2);
    background: hsl(0, 0%, 90%, 0.2);
    border-radius: 1rem;
    overflow: hidden;
    /* transition: all 100ms ease-in-out; */
    backdrop-filter: brightness(1.1) blur(3px) url(#displacementFilter);
}


nav div.items {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

nav div.searchbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    font-size: large;

    input {
        width: 100%;
        height: 100%;
        font-size: larger;
        outline: none;
        background: none;
        border: none;

        /* color: hsl(0, 0%, 100%); */
        &::placeholder {
            color: hsl(0, 0%, 90%, 0.5);
        }
    }
}


main {
    /* border: 2px solid hsl(120, 100%, 25%); */
    width: 100%;
    height: 100vh;
    padding: 1rem;
    gap: 1rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    pointer-events: none;
    > * {
        pointer-events: auto;
    }
}

main::-webkit-scrollbar {
    display: none;
}

main section.content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* grid-auto-rows: repeat(minmax(100px, auto), 1fr); */
    grid-template-rows: repeat(10, 1fr);
    gap: 10px;
}

main>section {
    height: 100%;
    flex-shrink: 0;
}


.clock {
    display: grid;
    place-items: center;
    grid-area: 4 / 2 / 1 / 1;
    padding: 1rem;
    font-size: 2rem;
    text-align: center;
    border: 2px solid hsl(0, 0%, 95%, 0.2);
    box-shadow: inset 0px 0px 10px 1px hsla(0, 0%, 100%, 0.2);
}

.weather {
    grid-area: 3 / 3 / 1 / 2;
    padding: 1rem;
    display: grid;
    place-items: center;
    font-size: larger;
}

.calendar {
    grid-area: 11 / 2 / 4 / 1;
    /* padding: 1rem; */
    /* gap: 10px; */
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;

    div.head {
        background-color: hsl(0, 0%, 100%, 0.2);
        gap: 1ch;
        font-weight: bolder;
        display: flex;
        align-items: center;
        justify-content: start;
        /* border: 1px solid white; */
        width: 100%;
        padding: 1rem 1rem 1rem 1rem;
        border-bottom: 2px solid hsl(0, 0%, 100%, 0.1);

        .cal-nav {
            margin-left: auto;

            i {
                cursor: pointer;
                aspect-ratio: 1/1;
                padding: 1rem;
                display: inline-flex;
                align-items: center;
                border-radius: 50%;
                /* transition: all 0.3s ease-in-out; */

                &:hover {
                    background: hsl(0, 0%, 95%, 0.2);
                }
            }
        }
    }

    div.days {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        place-items: center;
        /* border: 1px solid red; */
        border-bottom: 2px solid hsl(0, 0%, 90%, 0.3);
        padding: 1rem 1rem 0.2rem 1rem;

        div.day {
            /* box-sizing: content-box; */
            font-weight: bolder;
            aspect-ratio: 1/1;
            /* border: 1px solid white; */
            height: 100%;
            display: grid;
            place-items: center;
        }
    }

    div.dates {
        /* border: 1px solid red; */
        width: 100%;
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        grid-template-rows: repeat(6, 1fr);
        gap: 0.5rem;
        padding: 0.2rem 1rem 1rem 1rem;

        div.date {
            font-size: larger;
            transition: all 300ms ease-in-out;
            border-radius: 50%;
            /* border: 1px solid white; */
            height: 100%;
            text-align: center;
            display: grid;
            place-items: center;
            cursor: pointer;
            aspect-ratio: 1/1;

            &:hover {
                background: hsl(0, 0%, 95%, 0.2);
            }

            &.today {
                background: hsl(0, 0%, 95%, 0.2);
                border: 2px solid hsl(0, 0%, 95%, 0.3);
            }
        }

        div.grey {
            color: hsl(0, 0%, 0%);
        }
    }
}

div[data-dragable] {
    cursor: grab;
    position: unset;
}

div.dragging {
    cursor: grabbing;
    position: absolute;
    z-index: 99;
    scale: 1;
}

.todos>.input>input {
    outline: none;
    border: none;
    background-color: transparent;
    border-bottom: 2px solid hsl(0, 0%, 95%, 0.3);
    width: 100%;
    height: 100%;
    padding: 1rem;
    font-size: larger;
    background-color: hsl(0, 0%, 90%, 0.3);

    &::placeholder {
        color: hsl(0, 0%, 90%, 0.5);
    }
}

.todos {
    display: flex;
    flex-direction: column;
    grid-area: 11 / 2 / 3 / 2;
}

.todos > .input {
    position: relative;
    .todo-add-btn {
        width: 2rem;
        aspect-ratio: 1/1;
        display: grid;
        place-items: center;
        border-radius: 50%;
        cursor: pointer;
        background-color: hsl(0, 0%, 90%, 0.3);
        border: 2px solid hsl(0, 0%, 90%, 0.3);

        &:hover {
            background-color: hsl(0, 0%, 90%, 0.5);
        }
        content: '';
        top: 50%;
        right: 0.5rem;
        translate: 0 -50%;
        position: absolute;
    }
}

.todos > .todos-list {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    > div.todo {
        padding-bottom: 10px;
        border-bottom: 2px solid hsl(0, 0%, 90%, 0.3);
    }
}

/* links section  */

.add-btn>i {
    aspect-ratio: 1/1;
    padding: 1rem;
    display: inline-flex;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
}

.add-btn {
    flex-shrink: 0;
    aspect-ratio: 1/1;
    height: fit-content;
    order: 999;
}

section.links {
    display: flex;
    gap: 1rem;
}

section.links>a {
    display: block;
    text-decoration: none;
    /* color: hsl(0, 0%, 90%); */
    background-color: hsl(0, 0%, 90%, 0.2);
    padding: 1rem;
    flex-shrink: 0;
    aspect-ratio: 1/1;
    height: fit-content;

    border: 2px solid hsl(0, 0%, 90%, 0.3);
    border-radius: 1rem 1rem 1rem 1rem;
    text-shadow: 0 0 5px hsla(0, 0%, 0%, 0.5);
    box-shadow: inset 0px 0px 1rem 0.3rem hsl(0, 0%, 90%, 0.2);


    backdrop-filter: brightness(1.1) blur(2px) url(#displacementFilter);
}





/* prompt  */

dialog {
    border: none;
    border-radius: 1rem;
    padding: 2rem;
    min-width: 300px;
    background: hsl(0, 0%, 90%, 0.1);
    backdrop-filter: blur(20px) saturate(160%);
    box-shadow: 0 8px 32px hsl(0, 0%, 0%, 0.3);
    transition: all 0.3s ease;
    outline: none;
    position: relative;
}

dialog > input {
    border: none;
    border-radius: 1rem;
    padding: 1rem;
    min-width: 300px;
    background: hsl(0, 0%, 90%, 0.1);
    backdrop-filter: blur(20px) saturate(160%);
    box-shadow: 0 8px 32px hsl(0, 0%, 0%, 0.3);
    transition: all 0.3s ease;
    outline: none;
    &::placeholder{
        color: hsl(0, 0%, 90%, 0.5);
    }
}

dialog > button {
    cursor: pointer;
    border: none;
    border-radius: 1rem;
    padding: 1rem;
    background: hsl(0, 0%, 90%, 0.1);
    backdrop-filter: blur(20px) saturate(160%);
    box-shadow: 0 8px 32px hsl(0, 0%, 0%, 0.3);
    transition: all 0.3s ease;
    outline: none;
}

dialog > .close {
    content: 'x';
    cursor: pointer;
    color: hsl(0, 0%, 0%,0.5);
    outline: none;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}



dialog::backdrop {
    background: hsl(0, 0%, 0%, 0.4);
    backdrop-filter: blur(4px);
}

dialog[open] {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

