@import 'src/global/styles/var';

.glue-tabs {
  display: block;
  position: relative;

  &__wrap {
    overflow: hidden;

    &--page-top {
      position: fixed;
    }

    &--content-bottom {
      top: auto;
      bottom: 0;
    }

    &--scrollable {
      .glue-tab {
        flex: 1 0 auto;
        padding: 0 @padding-sm;
      }

      .glue-tabs__nav {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;

        &::-webkit-scrollbar {
          display: none;
        }
      }
    }
  }

  &__nav {
    position: relative;
    display: flex;
    background-color: @tabs-nav-background-color;
    user-select: none;

    &--line {
      box-sizing: content-box;
      height: 100%;
      padding-bottom: 15px; /* 15px padding to hide scrollbar in mobile safari */
    }

    &--complete {
      padding-right: @padding-xs;
      padding-left: @padding-xs;
    }

    &--card {
      box-sizing: border-box;
      height: @tabs-card-height;
      margin: 0 @padding-md;
      border: @border-width-base solid @tabs-default-color;
      border-radius: @border-radius-sm;

      .glue-tab {
        color: @tabs-default-color;
        border-right: @border-width-base solid @tabs-default-color;

        &:last-child {
          border-right: none;
        }

        &.glue-tab--active {
          color: @white;
          background-color: @tabs-default-color;
        }

        &--disabled {
          color: @tab-disabled-text-color;
        }
      }
    }
  }

  &__line {
    position: absolute;
    bottom: 15px;
    left: 0;
    z-index: 1;
    width: @tabs-bottom-bar-width;
    height: @tabs-bottom-bar-height;
    background-color: @tabs-bottom-bar-color;
    border-radius: @tabs-bottom-bar-height;
  }

  &__track {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    will-change: left;
  }

  &--line {
    .glue-tabs__wrap {
      height: @tabs-line-height;
    }
  }

  &--card {
    > .glue-tabs__wrap {
      height: @tabs-card-height;
    }
  }
}
