@import '../../core/stylesheets/variables.scss';

$tab-width: 72px;
$tab-max-width: 264px;

.md-tabs {
  width: 100%;
  display: flex;
  flex-flow: column;
  position: relative;

  &.md-transition-off * {
    transition: none !important;
  }

  &.md-dynamic-height {
    .md-tabs-content {
      transition: height $swift-ease-out-duration $swift-ease-out-timing-function;
    }
  }

  .md-tabs-navigation {
    height: 48px;
    min-height: 48px;
    position: relative;
    z-index: 1;
    display: flex;
    transition: $swift-ease-out;

    &.md-has-icon.md-has-label {
      min-height: 72px;

      .md-icon {
        margin-bottom: 10px;
      }
    }

    &.md-centered {
      justify-content: center;
    }

    &.md-fixed {
      .md-tab-header {
        flex: 1;
      }
    }

    &.md-right {
      justify-content: flex-end;
    }
  }

  .md-tab-header {
    min-width: $tab-width;
    max-width: $tab-max-width;
    margin: 0;
    padding: 0 12px;
    display: inline-block;
    position: relative;
    cursor: pointer;
    border: 0;
    background: none;
    transition: $swift-ease-out;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;

    &.md-disabled {
      cursor: default;
      pointer-events: none;
      user-select: none;
      -webkit-user-drag: none;
    }
  }

  .md-tab-header-container {
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;

    .md-icon {
      margin: 0;
    }
  }

  .md-tab-indicator {
    height: 2px;
    position: absolute;
    bottom: 0;
    left: 0;
    transform: translate3D(0, 0, 0);

    &.md-transition-off {
      transition: none !important;
    }

    &.md-to-right {
      transition: $swift-ease-out,
                  left .3s $swift-ease-in-out-timing-function,
                  right .15s $swift-ease-in-out-timing-function;
    }

    &.md-to-left {
      transition: $swift-ease-out,
                  right .3s $swift-ease-in-out-timing-function,
                  left .15s $swift-ease-in-out-timing-function;
    }
  }

  .md-tabs-content {
    width: 100%;
    height: 0;
    position: relative;
    overflow: hidden;
  }

  .md-tabs-wrapper {
    width: 9999em;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translate3d(0, 0, 0);
    transition: transform $swift-ease-out-duration $swift-ease-out-timing-function;
  }

  .md-tab {
    padding: 16px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
  }
}
