@import "./mixins/variables";


.u-tabs {
  display: block;
  width: 100%;
}

.u-tabs__tab-bar {
    display         : flex;
    flex-direction  : row;
    justify-content : center; // ⇾
    align-content   : space-between; // ||
    align-items     : flex-start; // ↓

    height          : 48px;
    padding         : 0 0 0 0;
    margin          : 0;
    border-bottom   : 1px solid $tab-border-color;
}

.u-tabs__tab {
  margin: 0;
  border: none;
  padding: 0 24px 0 24px;

  float: left;
  position: relative;
  display: block;

  text-decoration: none;
  height: 48px;
  line-height: 48px;

  text-align: center;
  font-weight: 500;
  font-size: $layout-tab-font-size;
  text-transform: uppercase;

  color: $tab-text-color;
  overflow: hidden;

  &:hover:after{
    border-bottom-color: #bdbdbd;
  }

  .u-tabs.is-upgraded &.is-active {
    color: $tab-active-text-color;
  }

  .u-tabs.is-upgraded &.is-active:after {
    height: 2px;
    width: 100%;
    display: block;
    content: " ";
    bottom: 0px;
    left: 0px;
    position: absolute;
    background: $tab-highlight-color;
    animation: border-expand 0.2s cubic-bezier(0.4, 0.0, 0.4, 1) 0.01s alternate forwards;
    transition: all 1s cubic-bezier(0.4, 0.0, 1, 1);
  }

  & .u-tabs__ripple-container {
    display: block;
    position: absolute;
    height: 100%;
    width: 100%;
    left: 0px;
    top: 0px;
    z-index: 1;
    overflow: hidden;

    & .u-ripple {
      background: $tab-highlight-color;
    }
  }
}

.u-tabs-pill .u-tabs__tab{
    &:hover{
        text-decoration : none;
          background-color : #eee;
    }
    &.is-active{
        background-color : $tab-highlight-color;
        color : #FFFFFF;
        &:after{
          height:0px;
        }
    }
}


.u-tabs__panel {
  display: block;

  .u-tabs.is-upgraded & {
    display: none;
  }

  .u-tabs.is-upgraded &.is-active {
    display: block;
  }
}

@keyframes border-expand {
  0% {
    opacity: 0;
    width: 0;
  }

  100% {
    opacity: 1;
    width: 100%;
  }
}
