@use '@taiga-ui/styles/utils' as taiga;

:host {
  margin: 0;
  padding: 0;
}

tui-drawer {
  top: 0;
  border-radius: 0;
  background-color: rgb(var(--tw-color-zinc-700) / 0.9);
}

header {
  @include taiga.scrollbar-hidden();

  // @TODO Theme
  background: #2b2b2f;
  overflow: hidden;
  width: 100%;
  position: fixed;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 10;

  @media screen and (min-width: 768px) {
    width: 17rem;
    background-color: rgb(var(--tw-color-zinc-700) / 0.9);
    backdrop-filter: blur(40px);
    padding: 2rem 0 1.5rem 0;
    height: 100%;
    min-height: 100%;
    border-image: linear-gradient(
        to bottom,
        rgb(var(--tw-color-zinc-700)),
        rgb(var(--tw-color-zinc-400))
      )
      1;
    border-width: 0;
    border-right: 0.125rem solid;
    overflow: auto;
  }

  @media screen and (min-width: 1536px) {
    width: 18rem;
  }
}

.title {
  display: none;

  @media (min-width: 768px) {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    padding-bottom: 0.75rem;
  }

  store-icon {
    height: 64px;
  }

  h1 {
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 2rem;
    color: rgb(244 244 245);
    text-align: center;
    margin-bottom: 0.75rem;
    pointer-events: none;
  }
}

.nav {
  &-desktop {
    display: none;
    padding: 0.75rem 1rem;

    marketplace-search {
      place-self: center;
      padding-bottom: 2rem;
      width: 100%;
    }

    @media (min-width: 768px) {
      display: flex;
      flex-grow: 1;
      flex-direction: column;
    }

    &-container {
      display: flex;
      flex-grow: 1;
      flex-direction: column;
      justify-content: space-between;

      ::ng-deep a {
        display: flex;
        gap: 0.5rem;
        padding: 0.5rem;

        &:hover {
          text-decoration-line: none;
          cursor: pointer;
        }

        span {
          font-size: 1rem;
          line-height: 1.5rem;
          color: rgb(250 250 250);
          text-overflow: ellipsis;
          overflow: hidden;
          white-space: nowrap;
        }
      }
    }
  }

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

    &-bar {
      display: flex;
      align-items: center;
      padding: 1rem;
      width: 100vw;

      marketplace-search {
        flex-grow: 1;
      }
    }

    &-sidebar {
      display: flex;
      flex-direction: column;
      height: 100%;
      margin: -1.25rem -1.5rem;

      &-top {
        display: flex;
        align-items: center;
        padding: 1rem;
        border-bottom: 1px solid rgb(113 113 122);

        h1 {
          font-weight: 600;
          font-size: 1.25rem;
          line-height: 1.75rem;
          color: rgb(228 228 231);
          flex-grow: 1;
        }

        button {
          place-self: end;
        }

        store-icon {
          border-radius: 100%;
          display: flex;
          margin-right: 12px;
        }
      }

      &-bottom {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        border-top: 1px solid rgb(113 113 122);
        height: 100%;

        marketplace-categories {
          flex-grow: 1;
          padding: 1.25rem 1.25rem 0 1.25rem;
        }

        ::ng-deep a {
          display: flex;
          gap: 0.5rem;
          padding: 1.25rem;

          &:hover {
            text-decoration-line: none;
          }

          span {
            font-size: 1rem;
            line-height: 1.5rem;
            color: rgb(250 250 250);
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
          }
        }
      }

      .divide-bar > * + * {
        border-top-width: 1px;
        border-bottom-width: 0;
        border-color: rgb(113 113 122);
      }
    }
  }
}

*,
::before,
::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: rgb(var(--tw-color-gray-200) / 1);
}
