@import '../../assets/styles/colors';
@import '../../assets/styles/rsfonts';

.tab-bar-container {
  @extend .fontPoppinsRegularSm;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-y: visible;
  z-index: 1;
}

.tab-bar {
  display: flex;
  flex-grow: 1;
  white-space: nowrap;
  border-bottom: 1px solid $grey_11;
  transition: transform 0.3s ease;
  height: 35px;
}

.tab-component {
  @extend .fontPoppinsRegularSm;
  padding: 8px 8px 12px;
  cursor: pointer;
  color: $text_color;
  text-align: center;
  white-space: nowrap;
  position: relative;
  margin-right: 8px;

  &.active {
    color: $primary;
    font-weight: bold;
  }

  &.active::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    bottom: -2px;
    height: 2px;
    background-color: $primary;
  }

  &.disabled {
    color: $text_color;
    cursor: not-allowed;
    opacity: 0.5;
  }

  .submenu-toggle {
    @extend .fontPoppinsRegularSm;
    background: none;
    border: none;
    color: $text_color;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-left: 4px;
    outline: none;

    &:focus {
      outline: none;
    }
  }

  .submenu-container {
    position: relative;
    z-index: 2;
  }
}

.submenu {
  @extend .fontPoppinsRegularSm;
  position: absolute;
  top: 28px;
  left: 0;
  background-color: $white;
  border: 1px solid $grey_11;
  box-shadow: 0px 4px 8px $shadow;
  z-index: 9999;
  color: $text_color;
  white-space: nowrap;
  ul {
    padding: 0px;
    margin: 0px;
  }
}

.submenu li {
  list-style: none;
  padding: 8px;
  cursor: pointer;
}

.submenu li:hover {
  background-color: $grey_6;
  color: $primary;
}

.scroll-button {
  position: absolute;
  top: 0;
  height: 100%;
  background: $grey_11;
  border: none;
  cursor: pointer;
  z-index: 1;

  &.left {
    left: 0;
  }

  &.right {
    right: 0;
  }
}
