@use 'apps/dashboard/src/variables' as *;
@use '../select-account.tokens' as tokens;

.select {
  background-color: $color-light-stronger;
  border-radius: rhythm(1);
  margin: 0 auto;
  max-height: tokens.$height-page-container;
  padding: tokens.$vertical-padding rhythm(12);
  position: relative;
  top: 10vh;
  width: 600px;

  .select-container {
    display: flex;
    flex-direction: column;
  }

  .logo {
    margin-bottom: tokens.$vertical-padding;
    text-align: center;

    img {
      height: auto;
      width: rhythm(20);
    }
  }
  .select-content {
    flex: 1 1 auto;
    height: fit-content;
    transition: height $transition-response;

    .outlet-container {
      opacity: 0;
    }

    &.select-kb-visible .outlet-container {
      opacity: 1;
      transition: opacity $duration-superfast 350ms;
    }
  }
}

.select-account {
  height: 100%;
  transition: height $transition-hint;

  .select-account-list {
    max-height: calc(#{tokens.$height-page-container} - #{tokens.$vertical-padding} * 4 - #{rhythm(5)});
    overflow-y: auto;
    overflow-x: hidden;
    // Move scrollbar to the edge
    padding: 0 rhythm(2);
    margin: 0 -#{rhythm(2)};

    @include scrollbar-black();
  }

  .select-account-footer {
    display: flex;
    justify-content: center;
    margin-top: rhythm(7);
  }

  .select-account-item:not(:last-child) {
    margin-bottom: rhythm(1);
  }

  .account {
    align-items: center;
    background-color: $color-neutral-lighter;
    color: inherit;
    display: flex;
    font-weight: $font-weight-semi-bold;
    height: rhythm(5);
    justify-content: center;
    position: relative;
    text-decoration: none;
    transition:
      background-color $transition-hint,
      color $transition-hint;
    width: 100%;

    .account-arrow {
      position: absolute;
      top: 50%;
      right: rhythm(2);
      transform: translateY(-50%);
    }
    &:focus,
    &:hover {
      outline: 0;
      background-color: $color-dark-stronger;
      color: $color-light-stronger;
      .account-arrow svg {
        fill: $color-light-stronger;
      }
    }
  }
}
