@use '../../sass/abstracts/variables' as *;
@use '../../sass/abstracts/mixins';

#{$component-prefix}tabs {
  &__nav {
    border-bottom: 10px solid $blue-50;
    margin-bottom: 5px;
    width: 100%;
  }

  &__item {
    background-color: $light-grey;
    border-top-left-radius: $border-radius;
    border-top-right-radius: $border-radius;
    margin-right: 5px;
    padding: 0.95rem 1.8rem;
    display: inline-block;
    color: $sodra-black;
    white-space: nowrap;
    font-family: $font-family-body;

    &:hover {
      background-color: darken($light-grey, 10%);
      color: inherit;
    }

    &[aria-selected='true'] {
      background-color: $blue-50;
      pointer-events: none;
      cursor: default;
    }

    &[aria-hidden='true'] {
      visibility: hidden;
      position: absolute;
    }
  }

  &__pane {
    display: none;

    &[aria-hidden='false'] {
      display: block;
    }
  }

  &__dropdown {
    position: relative;

    &[aria-hidden='true'] {
      visibility: hidden;
    }
  }

  &__dropdown-menu {
    display: none;
    position: absolute;
    background-color: $light-grey;
    border: 1px solid darken($light-grey, 10%);
    min-width: 10rem;
    right: 0;
    font-family: $font-family-body;
    z-index: 100;

    &[aria-expanded='true'] {
      display: block;
    }
  }

  &__dropdown-menu-item {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    display: block;
    color: $sodra-black;
    cursor: pointer;

    &[aria-hidden='true'] {
      display: none;
    }

    &[aria-selected='true'] {
      background-color: $blue-50;
      pointer-events: none;
      cursor: default;
    }

    &:hover {
      color: inherit;
      background-color: darken($light-grey, 10%);
    }
  }

  &__expander {
    &:after {
      @include mixins.unity-symbols('keyboard-arrow-down', 0.5rem);
      margin-left: 0.5rem;
    }
  }

  #{$object-prefix}select-list__trigger {
    border: none;
  }
}
