/* Sidebar CSS */

header {
  display: none;
  @media (max-width: 992px) {
    display: block;
  }

  width: 100vw;
  height: var(--header-height);
  background-color: #e0f7ea;
  position: fixed;
  inset: 0;
  z-index: 100;

  .hamburger {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 32px;
  }

  > div {
    text-indent: 14px;
    font-size: 10px;
    line-height: 12px;
    letter-spacing: 17px;
    text-align: center;
    margin-top: 16px;

    img {
      width: 102px;
      margin-bottom: 8px;
      transform: translateX(-8px);
    }
  }
}

.sidebar {
  background-color: #e0f7ea !important;
  @media (pointer: coarse) {
    height: calc(100vh - 40.2); /* 把 header 高度扣掉 */
  }

  @media (pointer: fine) {
    height: 100vh;
  }
  position: fixed;
  width: var(--sidebar-width);
  padding: 24px 24px;
  color: var(--color-dark-blue);

  display: flex;
  flex-direction: column;

  .sidebar-logo {
    @media (max-width: 992px) {
      display: none;
    }
    text-align: center;
    font-size: 12px;
    line-height: 14.4px;
    font-weight: 400;

    div {
      letter-spacing: 16px;
      text-indent: 14px;
    }

    img {
      width: 164px;
      margin-bottom: 12px;
    }
  }

  @media (max-width: 992px) {
    z-index: 10000;
  }

  .close {
    display: none;
    @media (max-width: 992px) {
      display: block;
    }
  }
}

.nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  overflow-y: auto;
  flex-wrap: nowrap;
}

.nav-link {
  cursor: pointer;
  height: 48px;
  padding: 12px;
  margin: 12px;
  font-size: 16px;
  line-height: 19.2px;
  display: flex;
  align-items: center;
  font-weight: 400;
  border: none;
  border-radius: 12px;
  background-color: transparent;
  width: -webkit-fill-available;
  &.active {
    color: #333;
    background-color: #f9fff8;
  }

  &.sub-nav-link {
    padding: 8px 0;
    padding-left: 65px;
    margin: 0px;
    margin-bottom: 10px;
    height: unset;
    &.active {
      color: var(--color-primary);
      background-color: transparent;
    }

    &:last-child {
      margin-bottom: 12px;
    }
  }

  .flex-fill {
    background: green;
  }

  .dropdown-icon {
    transform-origin: center;
    transform: translateY(1.5px);
    transition: transform 200ms ease-in-out;
  }

  &[aria-expanded='true'] {
    /* Your styles here */
    .dropdown-icon {
      transform: rotate(90deg);
    }
  }
}

.user-profile {
  /* position: fixed; */
  /* bottom: 16px; */
  /* left: 36px; */
  padding: 0 12px;
  display: flex;
  align-items: center;
  font-size: 16px;

  .user-avatar {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    overflow: hidden;
  }

  .store {
    font-weight: 500;
    line-height: 19.2px;
  }

  .user-id {
    font-weight: 600;
    line-height: 21px;
    color: #1dacb0;
  }
}

.notification {
  &.unread {
    position: relative;
    &:before {
      border-radius: 50%;
      content: '';
      position: absolute;
      width: 4px;
      height: 4px;
      top: 13px;
      left: 30px;
      background: var(--color-red);
    }
  }
}

.accordion {
  display: contents;
}

main {
  margin-left: var(--sidebar-width);
  padding: 44px 90px 44px 38px;

  @media (max-width: 992px) {
    margin-left: 0;
    margin-top: var(--header-height);
    padding: 44px 32px;
  }
}
