// Tabs (Vertical and Horizontal)
//==================================================/

.animated-bar {
  height: 7px;
}

.tab-container.has-counts {
  > .tab-list-container {
    .tab-list {
      padding: unset;
    }
  }
}

.tab-container.horizontal:not(.has-counts) {
  > .tab-list-container {
    margin-top: 6px;
    height: 36px;

    .tab {
      a {
        padding: 7px 11px 5px;
      }

      &:not(.is-selected):not(.is-disabled):hover {
        border-bottom: 4px solid $tab-hover-color;
      }

      &:not(.is-disabled).is-selected {
        border-bottom: 4px solid $tab-selected-color;
      }

    }
  }
}

.tab-container.header-tabs {
  > .tab-list-container {
    .tab {
      a {
        padding: 12px 11px 5px;
      }
    }
  }
}

.tab-container.horizontal,
.tab-container.header-tabs {
  &.has-counts {
    .tab-list {
      margin-bottom: -1px;

      .separator {
        margin-bottom: -6px;
      }

      .tab a {
        padding: 5px 11px 4px !important;
      }
    }
  }

  > .tab-list-container {
    margin-bottom: -41px;

    .tab {
      top: 0;

      &.has-popupmenu {
        .icon {
          height: 16px;
          margin: 7px 0 0 -5px;
          position: static;
          width: 32px;
        }
      }

      &.dismissible {
        .icon {
          &.close {
            margin-top: 3px;
          }
        }
      }

      // Adds "semi-bold" style to selected/active tabs
      &:not(.is-disabled).is-selected {
        a {
          font-weight: 700;
          letter-spacing: -0.2px;
        }
      }
    }
  }

  .add-tab-button {
    span[aria-hidden] {
      @include font-size(24);
    }
  }

  .more-actions-button {
    margin-top: 3px;

    .btn-actions {
      height: auto;
      min-height: 32px;
      min-width: 32px;
      width: auto;
    }
  }
}

.tab-container.has-placeholder {
  .tab.draggable.arrange-placeholder {
    height: 34px !important;
    top: 0;
  }
}

.popupmenu.tab-list-spillover,
.popupmenu.dropdown-tab {
  .icon {
    &.icon-error,
    &.icon-info,
    &.icon-alert {
      top: 9px;
    }

    &.icon-error {
      margin-top: 0;
    }
  }
}

.popupmenu.tab-list-spillover.has-icons.is-selectable > li .icon.icon-error:not(.arrow):not(.close) {
  top: -1px;
  right: 23px;
}

.tab-container.horizontal > .tab-list-container .tab {
  .icon-error,
  .icon-info,
  .icon-success,
  .icon-alert {
    right: -1px;
    top: 10px;
    width: 18px;
    height: 18px;
  }
}

.tab-container.horizontal .add-tab-button {
  top: 8px;
  padding: 0;
  width: 35px;
  height: 30px;
  color: $tab-add-tab-color;

  span[aria-hidden] {
    font-size: 25px;
    top: 2px;
  }

  svg.icon-add {
    top: 7px;
    height: 18px;
    width: 18px;
  }
}

.tab-focus-indicator.is-visible {
  border-color: $tab-selected-color;
  box-shadow: $focus-box-shadow-new;
}

.tab-container.header-tabs .tab-list-container {
  .tab.is-error {
    &:not(.last-child) {
      &.is-error,
        &.is-info,
        &.is-success,
        &.is-alert {
          a[role='tab'] {
            padding: 14px 22px 5px 5px;

            + .icon-error.icon {
              margin-top: -4.5px;
            }
          }
        }
    }
  }
}

// RTL Styles
html[dir='rtl'] {
  .tab-container.horizontal,
  .tab-container.header-tabs {
    .tab {
      .icon-error {
        right: auto !important;
      }
    }
  }

  .tab-container.horizontal:not(.has-counts)>.tab-list-container .tab:not(.is-disabled).is-selected {
    border-bottom: 6px solid $tab-selected-color;
  }
}

html[dir='rtl'] .tab-container.horizontal .tab-list-container .tab:not(.last-child).is-error a[role='tab'],
html[dir='rtl'] .tab-container.header-tabs .tab-list-container .tab:not(.last-child).is-error a[role='tab'] {
  padding: 7px 4px 5px 18px;
}

html[dir='rtl'] .tab-container.horizontal .tab .icon-error,
html[dir='rtl'] .tab-container.header-tabs .tab .icon-error {
  left: 0;
  right: auto;
  top: 10px;
}

@import '../tabs-module/tabs-module-new';
@import '../tabs-multi/multi-tabs-new';
@import './tabs-horizontal-new';
@import '../tabs-vertical/tabs-vertical-new';
