@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

*,
::after,
::before {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

h1 {
    font-size: 1.2375rem;
    color: #c71a1a;
}

a {
    cursor: pointer;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

li {
    list-style: none;
}


#sidebar {
    width: 70px;
    min-width: 70px;
    transition: all 0.25s ease-in-out;
    box-shadow: 0 0 35px 0 rgba(49, 49, 49, 0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    /* background-color: rgba(8, 6, 9, 1); */
    background-color: var(--sidebar-bg);
    height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar-scrollable {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    /* padding: 1.5rem 0; */
}

#sidebar.expand {
    width: 260px;
    min-width: 260px;
}

#toggle-btn {
    background-color: transparent;
    cursor: pointer;
    border: 0;
    padding: 1rem 1.5rem;
}

#toggle-btn i {
    font-size: 1.5rem;
    color: aliceblue;
}

#toggle-btn img {
    font-size: 1.5rem;
}

.sidebar-logo {
    margin: auto 0;
}

.sidebar-logo a {
    color: rgba(254, 3, 0, 1);
    font-size: 1.15rem;
    font-weight: 600;
}

.sidebar-logo a:hover {
    font-size: 1.25rem;
    color: rgb(255, 255, 255);
}

#sidebar:not(.expand) .sidebar-logo,
#sidebar:not(.expand) a.sidebar-link span:not(.badge) {
    display: none;
}

.sidebar-link .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.6em;
    text-indent: -0.25em;
}

.sidebar-nav {
    padding: 1.5rem 0;
    flex: 1 1 auto;
}

a.sidebar-link {
    padding: .625rem 1.625rem;
    color: white;
    display: block;
    font-size: 0.9rem;
    white-space: nowrap;
    border-left: 3px solid transparent;
}

.sidebar-link i {
    font-size: 1.1rem;
    margin-right: .75rem;
}

a.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 3px solid rgba(254, 3, 0);
}

.sidebar-item {
    position: relative;
}

#sidebar:not(.expand) .sidebar-item .sidebar-dropdown {
    position: absolute;
    top: 0;
    left: 70px;
    /* background-color: rgba(8, 6, 9, 255); */
    background-color: var(--sidebar-bg);
    padding: 0;
    min-width: 15rem;
    display: none;
}


#sidebar:not(.expand) .sidebar-item:hover .has-dropdown+.sidebar-dropdown {
    display: block;
    max-height: 15em;
    width: 100%;
    opacity: 1;
}

/* Handle second-level dropdown hover in collapsed sidebar */
#sidebar:not(.expand) .sidebar-dropdown .sidebar-item:hover .sidebar-dropdown {
    position: absolute;
    top: 0;
    left: 100%;
    /* background-color: rgba(8, 6, 9, 255); */
    background-color: var(--sidebar-bg);
    padding: 0;
    min-width: 15rem;
    display: block;
    max-height: 15em;
    opacity: 1;
    z-index: 999;
}


#sidebar.expand .sidebar-link[data-bs-toggle="collapse"]::after {
    border: solid;
    border-width: 0 0.075rem 0.075rem 0;
    content: "";
    display: inline-block;
    padding: 2px;
    position: absolute;
    right: 1.5rem;
    top: 1.4rem;
    transform: rotate(-135deg);
    transition: all .2s ease-out;
}

#sidebar.expand .sidebar-link[data-bs-toggle="collapse"].collapsed::after {
    transform: rotate(45deg);
    transition: all .2s ease-out;
}


/* First-level dropdown items: Login, Register under Auth */
#sidebar.expand .sidebar-dropdown .sidebar-item>.sidebar-link {
    padding-left: 3rem;
}

/* Second-level dropdown items: Link 1, Link 2 under Two Links */
#sidebar.expand .sidebar-dropdown .sidebar-dropdown .sidebar-item>.sidebar-link {
    padding-left: 4rem;
}

#sidebar hr {
    border: none;
    border-top: 1px solid white;
    margin: 0.5rem 1rem;
}

/* Style the scrollbar */
/* Width of the scrollbar */
.sidebar-scrollable::-webkit-scrollbar {
    width: 5px;
}

/* The color of the scrollbar itself */
.sidebar-scrollable::-webkit-scrollbar-thumb {
    background-color: rgba(254, 3, 0, 0.75);
    border-radius: 10px;
}

/* Background of the scrollbar track */
.sidebar-scrollable::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* When the scrollbar is hovered over, it becomes a bit more visible */
.sidebar-scrollable::-webkit-scrollbar-thumb:hover {
    background-color: rgba(254, 3, 0, 1);
}