:root {
    /* ===== Colors ===== */
    --sidebar-color: #87cefa;
    --primary-color: #84b8d8;
    --primary-color-light: #dadbdf;
    --toggle-color: #262628;
    --text-color-slidebar: #353535;

    /* ====== Transition ====== */
    --tran-03: all 0.2s ease;
    --tran-04: all 0.3s ease;
    --tran-05: all 0.3s ease;

    /* ====== Font Size ====== */
    --font-size-extra-big: 1.5rem;
    --font-size-big: 1.2rem;
    --font-size-medium: 0.9rem;
    --font-size-small: 0.5rem;
}

.dark {
    --sidebar-color: #242526;
    --primary-color: #84b8d8;
    --primary-color-light: #3a3b3c;
    --toggle-color: #262628;
    --text-color-slidebar: #e5e5e5;
}


/* ===== Sidebar ===== */
.sidebar {
    position: -webkit-sticky; /* for Safari */
    position: sticky;
    top: 0;
    left: 0;
    height: 100dvh;
    width: 15vw;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    background: var(--sidebar-color);
    transition: var(--tran-05);
    z-index: 100;
    display: flex;
    flex-direction: column;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.35);
    border-width: 1px;
}

.sidebar.close {
    width: 0;
}

.sidebar .close-toggle {
    padding: 15px 0;
    position: relative;
    flex: 1;
}

.close-toggle .toggle {
    position: absolute;
    right: -28px;
    transform: translateY(-50%) rotate(180deg);
    height: 25px;
    width: 25px;
    background: var(--primary-color);
    color: var(--toggle-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: var(--tran-05);
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.35);
    border-width: 1px;
}


.sidebar.close .toggle {
    transform: translateY(-50%) rotate(0deg);
}


.sidebar .menu-bar {
    overflow: hidden;
    -ms-overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: hidden;
    position: relative;
    flex: 5;
}

.menu-bar::-webkit-scrollbar {
    display: none;
}


.sidebar .sections {
    height: 10%;
    list-style: none;
    align-items: center;
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding: 7px 7px;
}

.sidebar .sections a {
    font-size: var(--font-size-big);
    list-style: none;
    height: 100%;
    background-color: transparent;
    width: 100%;
    border-radius: 6px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: var(--tran-03);
    color: var(--text-color-slidebar);
}


.sidebar .sections a:hover {
    background-color: var(--primary-color);
}

.sidebar.dark .sections a:hover {
    background-color: var(--primary-color-light);
}


.sidebar .icon {
    min-width: 10px;
    border-radius: 6px;
}

.sidebar .icon {
    min-width: 20px;
    border-radius: 6px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sidebar .text,
.sidebar .icon {
    color: var(--text-color-slidebar);
    transition: var(--tran-03);
}

.sidebar .text {
    align-self: center;
    font-size: var(--font-size-big);
    font-weight: 500;
    white-space: nowrap;
    opacity: 1;
}

.sidebar.close .text {
    opacity: 0;
}


/* =========================== */


.sidebar .bottom-content {
    width: 100%;
    position: relative;
    justify-self: flex-end;
    display: flex;
    flex-direction: column;
    bottom: 0;
    margin: 0;
    flex: 1;
}

.sidebar.close .bottom-content {
    display: none;
}

.sidebar .bottom-content .mode,
.sidebar .bottom-content .lang {
    position: relative;
    border-radius: 0 6px 6px 0;
    background: var(--primary-color-light);
    transition: var(--tran-05);
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    width: 100%;
    height: 60%;
    margin: 0;
    bottom: 0;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.35);
    border-width: 1px;
}

.sidebar .mode .sun-moon i.sun {
    display: none;
}

.sidebar.dark .sidebar .mode .sun-moon i.moon {
    display: none;
}

.sidebar .bottom-content .mode-text {
    text-align: center;
    text-wrap: inherit;
    font-size: var(--font-size-big);
}

.sidebar .bottom-content .toggle-switch {
    position: relative;
    right: 0;
    height: 100%;
    min-width: 35px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
}

.toggle-switch .switch {
    position: relative;
    height: 2vh;
    width: 35px;
    border-radius: 25px;
    background-color: var(--toggle-color);
    transition: var(--tran-05);
}

.toggle-switch .switch::before {
    content: '';
    position: absolute;
    height: 15px;
    width: 15px;
    border-radius: 50%;
    top: 50%;
    left: 2px;
    transform: translateY(-50%);
    background: var(--primary-color);
    transition: var(--tran-04);
}

/* Dark mode toggle position */
.sidebar.dark .mode .toggle-switch .switch::before {
    left: 20px;
}

/* Language toggle position */
.lang .toggle-switch.ro .switch::before {
    left: 20px;
}

@media screen and (max-width: 980px) {
    .sidebar {
        width: 35vw;
        font-size: var(--font-size-medium);
    }

    .sidebar .sections a {
        font-size: var(--font-size-medium);
    }

    .sidebar .bottom-content .mode-text {
        text-wrap: inherit;
        font-size: var(--font-size-medium);
    }
}