Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

4.6 KB
Raw Blame
@use "../../../../styles/mixins";

.sidebar {
  display: flex;
  flex-direction: column;
  grid-area: sidebar;
  background: linear-gradient(180deg, var(--hi-ink) 0%, var(--hi-ink-deep) 100%);
  color: var(--hi-color-white);
  position: relative;
  height: 100vh;

  &.closed {
      @media (min-width: 768px) {
        display: none;
      }
  }

  .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 16px 18px 12px;
    margin-bottom: 4px;
    flex-shrink: 0;

    a {
      display: flex;
      justify-content: center;
    }

    img {
      max-height: 36px;
      max-width: 160px;
      width: auto;
    }
  }

  .nav {
    flex: 1 1 auto;
    overflow: auto;
    position: relative;
    padding: 8px 0 24px;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;

    &:hover {
      scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    }

    &::-webkit-scrollbar {
      width: 8px;
      background: transparent;
    }

    &::-webkit-scrollbar-thumb {
      background-color: transparent;
      border-radius: 10px;
      transition: background-color 0.2s ease;
    }

    &:hover::-webkit-scrollbar-thumb {
      background-color: rgba(255, 255, 255, 0.2);
    }

    &::-webkit-scrollbar-track {
      background: transparent;
    }

    .sectionHeading {
      padding: 18px 20px 6px;
      font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
      font-size: 0.625rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.16em;
      color: color-mix(in srgb, white 45%, transparent);
    }

    a,
    button,
    .link {
      display: flex;
      align-items: center;
      color: color-mix(in srgb, white 78%, transparent);
      padding: 7px 10px;
      text-decoration: none;
      margin: 2px 12px;
      border-radius: var(--hi-radius-lg);
      font-size: 0.875rem;
      font-weight: 500;
      transition: background-color 0.15s ease, color 0.15s ease;
      position: relative;
      cursor: pointer;
      width: calc(100% - 24px);
      background: none;
      border: none;
      text-align: left;

      .navBadge {
        background: var(--mantine-color-secondary-5);
        color: white;
        padding: 2px 6px;
        border-radius: 12px;
        font-size: 0.75em;
        font-weight: 600;
        margin-left: auto;
      }

      .navBadgeAlert {
        margin-left: auto;
        background: #d97706;
        color: white;
      }

      &.loading {
        background-color: rgba(255, 255, 255, 0.08);
        animation: pulse 1.5s infinite;
      }

      @keyframes pulse {
        0%, 100% {
          opacity: 0.6;
        }
        50% {
          opacity: 0.3;
        }
      }

      &.linkActive {
        background: color-mix(in srgb, white 11%, transparent);
        color: white;
        font-weight: 600;

        &::before {
          content: '';
          position: absolute;
          left: 0;
          top: 50%;
          transform: translateY(-50%);
          width: 3px;
          height: 18px;
          border-radius: 2px;
          background: var(--mantine-color-secondary-5);
        }

        .linkIcon {
          color: white;
        }
      }

      &:hover {
        background: color-mix(in srgb, white 7%, transparent);
        color: white;
      }

      svg {
        margin-right: 12px;
        min-width: 20px;
        color: color-mix(in srgb, white 55%, transparent);
        transition: color 0.15s ease;
      }

      &:hover svg {
        color: color-mix(in srgb, white 85%, transparent);
      }
    }
  }

  .sidebarFooter {
    margin-top: auto;
    padding: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
  }

  @media (max-width: 767px) {
    position: fixed;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 200;
    transform: translateX(-100%);
    visibility: hidden;
    top: 0;
    left: 0;

    &.open {
      transform: translateX(0);
      visibility: visible;
    }
  }

  .sidebarClose {
    width: 24px;
    height: 24px;
    color: color-mix(in srgb, white 55%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    transition: color 0.15s ease, transform 0.15s ease;
    z-index: 5;
    flex-shrink: 0;

    &:hover {
      transform: translateY(-50%) scale(1.2);
      color: white;
    }

    @media (max-width: 767px) {
      right: 16px;
      top: 28px;
      transform: none;

      &:hover {
        transform: scale(1.1);
      }
    }
  }
}