/**
 * @license
 * Copyright 2018 Google Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

@import "@material/animation/variables";
@import "./mixins";

// postcss-bem-linter: define tab-indicator

.mdc-tab-indicator {
  @include mdc-tab-indicator-underline-color(primary);
  @include mdc-tab-indicator-underline-height(2px);
  @include mdc-tab-indicator-icon-color(secondary);
  @include mdc-tab-indicator-icon-height(34px);

  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.mdc-tab-indicator__content {
  transform-origin: left;
  opacity: 0;
}

.mdc-tab-indicator__content--underline {
  align-self: flex-end;
  width: 100%;
}

.mdc-tab-indicator__content--icon {
  align-self: center;
  margin: 0 auto;
}

.mdc-tab-indicator--active > .mdc-tab-indicator__content {
  opacity: 1;
}

// Slide by default
.mdc-tab-indicator > .mdc-tab-indicator__content {
  transition: 250ms transform $mdc-animation-standard-curve-timing-function;
}

// --no-transition is applied in cases where styles need to be applied immediately to set up a transition
.mdc-tab-indicator--no-transition > .mdc-tab-indicator__content {
  transition: none;
}

.mdc-tab-indicator--fade > .mdc-tab-indicator__content {
  transition: 150ms opacity linear;
}

// postcss-bem-linter: ignore
.mdc-tab-indicator--active.mdc-tab-indicator--fade > .mdc-tab-indicator__content {
  transition-delay: 100ms;
}

// postcss-bem-linter: end
