* {
    box-sizing: border-box;
}

body,
div,
ul,
li,
a,
h1,
h2,
h3,
h4 {
    margin: 0;
    padding: 0;
}

label,
.sidebar__nav {
    user-select: none;
}

body {
    --bg-color: color-mix(in srgb, #f62 70%, #fff);
    --sidebar-color: #fff;
    --dark-color: #f62;
    --text-color: #555;
    background-color: var(--bg-color);
    font-family: Montserrat;
}

/* SIDEBAR STYLES*/

.sidebar {
    background-color: var(--sidebar-color);
    position: fixed;
    height: 100dvh;
    width: clamp(220px, 2vw, 300px);
    font-size: clamp(1rem, 2.2vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 0 30px 6px;
}

.sidebar__name {
    flex: 1;
    display: flex;
}

.sidebar__nav ul {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.sidebar__item {
    list-style: none;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    font-size: .9rem;
    padding-right: 6px;
    color: var(--dark-color);
    border-radius: 36px 0 0 36px;
    position: relative;
}

.sidebar__item span {
    padding: 12px;
    font-size: 2rem;
}

.sidebar__item a {
    color: inherit;
    text-decoration: none;
}

.sidebar__item:hover {
    background-color: var(--bg-color);
    color: var(--sidebar-color);
}

.sidebar__item::before,
.sidebar__item::after {
    content: '';
    background-color: var(--bg-color);
    position: absolute;
    right: 0;
    width: 18px;
    height: 18px;
    background-color: transparent;
}

.sidebar__item:hover::before {
    top: -18px;
    border-bottom-right-radius: 25px;
    box-shadow: 4px 4px 0 4px var(--bg-color);
}

.sidebar__item:hover::after {
    bottom: -18px;
    border-top-right-radius: 25px;
    box-shadow: 4px -4px 0 4px var(--bg-color);
}

/* SIDEBAR PICTURE STYLES*/

.sidebar__picture {
    margin-left: 1.5rem;
    position: relative;
    z-index: 10;
}

.sidebar__picture img {
    width: clamp(4rem, 75%, 20rem);
    margin: auto;
    opacity: .82;
    filter: hue-rotate(-22deg);
}

/* SIDEBAR PROFILE MENU STYLES*/

.sidebar__profile img {
    border-radius: 50%;
    width: 2rem;
}

.item--profile .profile-option {
    font-size: .8rem;
    padding: 0 12px 0 5px;
    color: inherit;
}

.item--profile {
    margin: 12px;
    width: fit-content;
    color: var(--text-color);
}

.item--profile:hover {
    border-radius: 25px;
    color: var(--sidebar-color);
}

.item--profile:hover img {
    opacity: .7;
}

.item--profile::before,
.item--profile::after {
    display: none;
}

input[type="checkbox"] {
    display: none;
}

.sidebar__form {
    position: absolute;
    z-index: 20;
    right: -1rem;
}

.sidebar__form .open-button {
    display: none;
}

.sidebar label {
    position: relative;
    background-color: var(--bg-color);
    color: var(--sidebar-color);
    font-size: 2rem;
    border-radius: 50%;
    padding: .3rem;

}

.sidebar label::before,
.sidebar label::after {
    content: '';
    background-color: var(--bg-color);
    position: absolute;
    width: 9px;
    height: 25px;
    background-color: transparent;
}


.sidebar label::before {
    top: -25px;
    left: 19px;
    border-bottom-right-radius: 25px;
    box-shadow: 4px 4px 0 4px var(--bg-color);
}

.sidebar label::after {
    bottom: -25px;
    left: 19px;
    border-top-right-radius: 25px;
    box-shadow: 4px -4px 0 4px var(--bg-color);
}

input[type="checkbox"]:checked~label {
    color: var(--bg-color);
    background-color: var(--sidebar-color);
}

input[type="checkbox"]:checked~label::after,
input[type="checkbox"]:checked~label::before {
    display: none;
}

.sidebar:has(input[type="checkbox"]:checked) {
    width: fit-content;
}

.sidebar:has(input[type="checkbox"]:checked) .sidebar__form label {
    display: none;
}

.sidebar:has(input[type="checkbox"]:checked) .sidebar__form .open-button {
    display: block;
}

.sidebar:has(input[type="checkbox"]:checked) .sidebar__form {
    top: 4.8rem;
    width: fit-content;
}

.sidebar:has(input[type="checkbox"]:checked) .sidebar__picture img {
    max-width: 3.8rem;
}

.sidebar:has(input[type="checkbox"]:checked) .sidebar__picture {
    margin-left: 0;
}

.sidebar:has(input[type="checkbox"]:checked) picture {
    width: fit-content;
    margin-left: .75rem;
}

.sidebar:has(input[type="checkbox"]:checked) :is(.sidebar__item a, .profile-option) {
    display: none;
}