@use 'pix-design-tokens/typography';
@use 'pix-design-tokens/fonts';
@use 'pix-design-tokens/breakpoints';
@use '../../globals/layout';
@use '../../globals/colors';

.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: layout.$app-sidebar-width;
  height: 100vh;
  background-color: colors.$dark-blue-orga;

  &__logo {
    padding: 24px;

    img {
      height: 60px;
    }
  }
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  flex-grow: 1;

  &__item {
    display: flex;
    align-items: center;
    height: 40px;
    padding-left: 24px;
    color: var(--pix-neutral-0);
    font-size: 0.875rem;
    font-family: fonts.$font-roboto;
    text-decoration: none;
    border-left: 3px solid transparent;

    &:hover {
      background-color: colors.$chambray;
    }

    &.active {
      background-color: colors.$chambray;
      border-left: 3px solid var(--pix-warning-500);
    }
  }

  &__item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 8%;
    margin-right: 8px;
    fill: var(--pix-neutral-0);
  }

  &__documentation-item {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-end;
  }
}

.school-code-container {
  display: flex;
  flex-direction: column;
  align-items: center;

  h2 {
    @extend %pix-body-s;

    font-weight: var(--pix-font-bold);
  }

  p {
    @extend %pix-body-xs;

    display: flex;
    align-items: flex-start;
    margin: 0 0 var(--pix-spacing-3x) var(--pix-spacing-3x);
  }

  // Size attribute needed in component CopyPasteButton to adjust margin regarding icon size
  .copy-paste-button {
    &__clipboard {
      margin: -4px 6px 0 2px;
    }
  }

  .pix-icon-button {
    width: 1.5rem;
    min-width: 1.5rem;
    height: 1.5rem;
    color: var(--pix-primary-10);

    svg {
      width: 1rem;
      height: 1rem;
    }
  }

  .pix-icon-button:hover {
    color: var(--pix-info-700);
  }
}

.school-session {
  &__status {
    @extend %pix-body-xs;

    display: flex;
    gap: var(--pix-spacing-1x);
    align-items: center;
    justify-content: center;

    .pix-tooltip {
      width: 1.5rem;
      min-width: 1.5rem;
      height: 1.5rem;
      line-height: 0.8;

      svg {
        width: 1rem;
        height: 1rem;
      }
    }
  }
}

@include breakpoints.device-is('mobile') {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }
}

