.sidebar {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  color: var(--text-color);
  background-color: var(--primary-color);
  height: 100%;
  width: 272px;
  padding: 16px;
  padding-top: 0;
  overflow-x: hidden;
  max-height: 975px;
  transition: width 0s;
  min-width: 272px;
}

.sidebar.collapsed {
  width: 88px;
  padding: 0px 16px;
  overflow: hidden;
  min-width: 0;
}

.sidebar__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* position: fixed; */
  width: 100%;
  max-width: 240px;
}

.sidebar__divider {
  align-self: center;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(79, 70, 229, 1) 0%,
    rgba(40, 148, 236, 1) 100%
  );
  border: none;
}

.sidebar__wrapper {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  position: relative;
}

.sidebar-links__projinfo {
  width: 100%;
  display: flex;
  gap: 16px;
  height: 56px;
  padding: 8px;
  justify-content: flex-start;
}

.sidebar.collapsed .sidebar-links__projinfo {
  justify-content: center;
  max-width: 56px;
  min-width: 56px;
}

.sidebar-links-projinfo__logo {
  width: 40px;
  height: 40px;
}

.sidebar-links-projinfo__info {
  font-size: 16px;
  color: var(--text-color);
  line-height: 130%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sidebar.collapsed .sidebar-links-projinfo__info {
  display: none;
}

.sidebar-links-projinfo__plan {
  opacity: 40%;
  font-size: 14px;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-links__link {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 8px;
}

.sidebar.collapsed .sidebar-links__link {
  justify-content: center;
  max-width: 56px;
  max-height: 56px;
}

.sidebar-links__link:hover {
  background: var(--link-current);
  border-radius: 8px;
  box-shadow: var(--link-shadow);
}

.sidebar-links-link__text {
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sidebar.collapsed .sidebar-links-link__text {
  display: none;
}

.sidebar-links__link-current {
  background: var(--link-current);
  border-radius: 9px;
  box-shadow: var(--link-shadow);
}

.sidebar-links-link-current__img,
.sidebar-links__img {
  width: 24px;
  height: 24px;
  position: relative;
}

.sidebar__slider-right {
  display: none;
  position: fixed;
  z-index: 2;
  left: 76px;
  top: 50vh;
  transform: translateY(-50%);
  cursor: pointer;
}

.sidebar__slider-left {
  display: flex;
  position: fixed;
  z-index: 2;
  left: 260px;
  top: 50vh;
  transform: translateY(-50%);
  cursor: pointer;
}

.sidebar.collapsed .sidebar__slider-right {
  display: flex;
}

.sidebar.collapsed .sidebar__slider-left {
  display: none;
}

.sidebar:not(.collapsed) .sidebar__slider-right {
  display: none;
}

.sidebar:not(.collapsed) .sidebar__slider-left {
  display: flex;
}

.theme-switch {
  display: flex;
  position: absolute;
  top: 95%;
}

.switch {
  display: block;
  --width-of-switch: 3.5em;
  --height-of-switch: 2em;
  --size-of-icon: 1.4em;
  --slider-offset: 0.3em;
  position: relative;
  width: var(--width-of-switch);
  height: var(--height-of-switch);
  transition: all 0.5s ease;
  will-change: width, height;
}

.switch input {
  display: none;
  width: 0;
  height: 0;
  transition: all 0.5s ease;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--switch-color);
  transition: all 0.5s ease;
  border-radius: 30px;
  will-change: background-color, border-radius;
}

.slider:before {
  position: absolute;
  content: "";
  height: var(--size-of-icon, 1.4em);
  width: var(--size-of-icon, 1.4em);
  border-radius: 20px;
  left: var(--slider-offset, 0.3em);
  top: 50%;
  transform: translateY(-50%);
  background: #303136;
  box-shadow: inset -4px -3px 2px -2px #8983f7, inset -10px -4px 0 0 #a3dafb;
  transition: all 0.5s ease;
  will-change: left, background, box-shadow;
}

input:checked + .slider {
  background-color: var(--switch-color);
  transition: all 0.5s ease;
}

input:checked + .slider:before {
  left: calc(100% - (var(--size-of-icon, 1.4em) + var(--slider-offset, 0.3em)));
  background: linear-gradient(40deg, #ff0080, #ff8c00 70%);
  box-shadow: none;
  transition: all 0.5s ease;
}

@media (max-width: 100px) {
  .sidebar {
    max-width: 88px;
    min-width: 0;
  }
  .sidebar__links {
    max-width: 56px;
  }
  .switch {
    --width-of-switch: 3em;
  }
  .sidebar-links-link__text {
    display: none;
  }
  .sidebar__slider-left{
    display: none;
  }
  .sidebar__slider-right{
    display: none;
  }
  .sidebar:not(.collapsed) .sidebar__slider-left {
    display: none;
  }
  .sidebar:not(.collapsed) .sidebar__slider-right {
    display: none;
  }
}
