.vp-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;

  // NOTE: Compatible with Android Wechat
  // inset-inline-start: 0;
  left: 0;

  // this prevents footer issue on tablet
  z-index: 1;

  overflow-y: auto;

  width: var(--sidebar-width);
  margin: 0;
  padding-inline-start: calc(var(--sidebar-space) - var(--sidebar-width));

  background: var(--sidebar-bg-color);
  box-shadow: 2px 0 8px var(--card-shadow);

  font-size: 0.94rem;

  transition: background var(--color-transition),
    box-shadow var(--color-transition), padding var(--transform-transition),
    transform var(--transform-transition);

  backdrop-filter: saturate(150%) blur(12px);
  scrollbar-color: var(--theme-color) var(--border-color);
  scrollbar-width: thin;

  @media (max-width: hope-config.$pad) {
    font-size: 0.86em;
  }

  // on mobile
  @media (max-width: hope-config.$tablet) {
    z-index: 125;

    // a collapsed sidebar should not have box shadow
    box-shadow: none;

    // sidebar should be collapsed by default
    transform: translateX(-100%);

    #{hope-config.$rtl-selector} & {
      transform: translateX(100%);
    }
  }

  @media (min-width: hope-config.$pc) {
    // this value should be greater than footer height, and users should manually override it
    padding-bottom: 3rem;
    box-shadow: none;
    font-size: 1rem;
  }

  @media print {
    display: none;
  }

  #{hope-config.$rtl-selector} & {
    right: 0;
    left: unset;
  }

  a {
    display: inline-block;
    color: var(--text-color);
    font-weight: normal;
  }

  .icon {
    margin-inline-end: 0.25em;
  }

  &.hide-icon .icon {
    display: none !important;
  }
}

.vp-sidebar-mask {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9;

  width: 100vw;
  height: 100vh;

  background: rgb(0 0 0 / 15%);

  &.fade-enter-active,
  &.fade-leave-active {
    transition: opacity 0.25s;
  }

  &.fade-enter-from,
  &.fade-leave-to {
    opacity: 0;
  }
}
