/* Left Navbar (Desktop Only) */
.side-nav {
    width: 250px;
    height: 100dvh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
    padding: 20px;
    border-right: 0.4px solid var(--option2);
    background-color: var(--white);
    z-index: 10;
}

.logo{display: flex; gap: .5rem;}
/* .logo img {width: 3rem;} */
.logo img {width:7rem;}
.logo h1 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 24px; 
    font-weight: 400; 
    color: var(--primary);
}

.line {
    opacity: .5;
}

.add-note-form {
    padding: 5px 10px;
    background-color: var(--primary);
    border-radius: 1rem;
    border: 1px solid var(--primary);
    position: relative;
    z-index: 1;
    overflow: hidden;
    cursor: pointer;
    height: 3rem;
    margin-bottom: 1rem;
    box-shadow: 0px 4px 10px var(--black-05);
}

.add-note-form span {color: white; transition: 1.2s cubic-bezier(0.165, 0.84, 0.44, 1); font-size: 12px;}

.add-note-form::before {
    content: '';
    position: absolute;
    left: 48%; 
    top: 100%;
    transform: translateX(-50%);
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background-color: var(--white);
    z-index: -1;
    transition: 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: center center;
}

.add-note-form:hover::before {
    transform: scale(6);
}

.add-note-form:hover span {
    color: var(--primary);
}

.notebook-bar {
    display: flex;
    padding-inline: .5rem;
    margin-bottom: 1rem;
    justify-content: space-between;
    align-items: center;
    color: var(--primary);
}

.notebook-bar p {
    font-size: 12px;
}

.add-notebook-form {
    display: flex;
    border: none;
    width: fit-content;
    height: fit-content;
    font-size: 12px;
    cursor: pointer;
    color: var(--primary);
    background-color: var(--white);
    padding: .1rem .3rem;
    position: relative;
    border-radius: 1rem;
    z-index: 1;
    overflow: hidden;
    transition: .8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.add-notebook-form p {
    display: none;
}

.add-notebook-form::before {
    content: '';
    position: absolute;
    right: -600%; 
    top: -50%;
    transform: translateX(-50%);
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background-color: var(--primary);
    z-index: -1;
    transition: .8s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: center center;
}

.add-notebook-form:hover::before {
    right: -300%;
}

.add-notebook-form:hover {
    color: white;
}

.notebooks-list {
    flex-grow: 1;
    width: 95%;
    overflow-y: auto;
    margin-bottom: 1rem;
    margin-inline: auto;
    background-color: var(--option1);
    border-radius: 1rem;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    overflow-x: hidden;
}

.notebook-card {
    padding: 10px 15px;
    width: 95%;
    height: fit-content;
    max-height: 3rem;
    background-color: var(--option1);
    border-radius: .5rem;
    color: var(--black);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    overflow: hidden;
}

.notebook-card p {
    display: inline-block;
    font-size: 14px;
    max-width: 6rem;
    height: fit-content;
    scrollbar-width: none;
    -ms-overflow-style: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-y: hidden;
}

.notebook-card p::-webkit-scrollbar {
    display: none;
}

.buttons {
    opacity: 0;
    pointer-events: none;
    transition: .2s ease-in-out;
    display: flex;
    gap: .5rem;
}

.buttons button {
    border: none;
    background-color: transparent;
    cursor: pointer;
    color: var(--option4);
    transition: .2s ease-out;
}

.buttons button:hover {
    color: var(--black);
}

.buttons span {
    font-size: 16px;
}

.notebook-card:hover {
    background-color: var(--option2);
}

.notebook-card:hover .buttons {
    opacity: 1;
    pointer-events: all;
}

.notebook-card input{
    width: 90%;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid var(--black-05);
    outline: none;
    color: var(--black);
}

.notebook-card.selected {
    background-color: var(--primary);
    color: white;
}

.notebook-card.selected input {
    color: white;
    border-bottom: 1px solid white;

}

.notebook-card.selected button {
    color: var(--option2);
}

.notebook-card.selected button:hover {
    color: white;
}

.footer {
    /* border-top: 1px solid var(--option2); */
    padding: .2rem .5rem;
    /* padding-bottom: 2.5rem; */
    margin-inline: auto;
    /* box-shadow: -0px 4px 10px rgba(0, 0, 0, 0.4); */
}

.footer p {
    margin: 0;
    font-size: 10px;
    opacity: 0.5;
    text-align: center;
    color: var(--black);
}

/* Navbar (Mobile - Desktop */
.navbar {
    position: fixed;
    background-color: var(--option1);
    height: fit-content;
    top: 0;
    right: 0;
    padding: 10px 30px;
    /* Gunakan calc untuk mengurangi lebar margin agar tidak overflow */
    width: calc(100% - 250px); 
    margin-left: 250px; /* Samakan dengan lebar .side-nav */
    /* background-color: var(--black); */
    z-index: 5;
}

.navbar-1 {
    margin-top: .4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.navbar-1 label i {
    font-size: 18px;
    margin-right: 1rem;
    margin-left: 1rem;
    transition: .4s ease-out;
}

.navbar-1 label i {
    color: var(--option2);
}

.navbar-1 label i.ri-sun-line:hover {
    color: var(--sun);
    scale: 1.1;
}

.navbar-1 label i.ri-moon-fill:hover {
    color: var(--moon);
    scale: 1.1;
}

.navbar-1 label input {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0
}

.navbar-1 label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
}

.navbar-2 {
    margin-top: -.5rem;
    font-size: 14px;
}

.notebook-dashboard-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--black);
}

.date {
    color: var(--black);
}

.button-wrapper {
    display: flex;
    gap: 1rem;
}

.mobile-menu {
    border: none;
    padding-inline: 5px;
    padding-block: 0;
    background-color: var(--option1);
    color: var(--black);
    border-radius: .2rem;
    display: none;
    justify-content: center;
    align-items: center;
}

.mobile-menu:active {
    background-color: var(--option3);
}

.mobile-add-note {
    position: absolute;
    right: -3%;
    top: 90%;
    transform: translateX(-50%) translateY(-50%);
    padding: 25px 30px;
    border-radius: 1rem;
    outline: none;
    border: 1px solid var(--primary);
    background-color: var(--primary);
    color: var(--white);
    cursor: pointer;
    display: none;
    z-index: 100;
}

.mobile-add-note:active {
    background-color: var(--option1);
    color: var(--primary);
}

.close-side-nav {
    padding: 0;
    width: fit-content;
    display: none;
    justify-content: center;
    align-items: center;
    color: var(--option4);
    position: absolute;
    right: 2rem;
    border: none;
    background-color: var(--white);
    border-radius: .2rem;
}

.close-side-nav span {
    font-size: 28px;
}

.close-side-nav:active {
    background-color: var(--option3);
}


@media (max-width: 620px) {
    .side-nav {
        width: 100%;
        z-index: 800;
        transform: translateX(35rem);
        transition: .2s ease-out;
        opacity: 0;
    }
    .side-nav.open {
        transform: translateX(0);
        opacity: 1;
    }
    .side-nav .add-note-form {
        display: none;
    }
    .navbar {
        width: 100%;
        margin-left: 0;
    }
    .navbar-1 {
        font-size: 10px;
    }
    .navbar-2 {
        margin-top: 1rem;
        font-size: 12px;
    }
    .mobile-menu {
        display: flex;
    }
    .mobile-add-note {
        display: block;
    }
    .add-notebook-form {
        display: flex;
        flex-direction: row;
        background-color: var(--primary);
        color: white;
        padding: 5px 10px;
    }
    .add-notebook-form p {
        margin-left: .5rem;
        display: inline-block;
    }
    .notebook-card {
        width: 98%;
    }
    .notebook-card p {
        font-size: 16px;
    }
    .notebook-card .buttons {
        opacity: 1;
        pointer-events: all;
        gap: 1rem;
    }
    .notebook-card .buttons span {
        font-size: 20px;
    }
    .close-side-nav {
        display: flex;
    }
    .notebook-card p {
        max-width: 10rem;
    }
}

/* Resposive pakai .side-nav */