//
// Copyright 2019 Stijn de Witt. Some rights reserved.
// Licensed under the MIT Open Source license. 
// https://opensource.org/licenses/MIT
// See LICENSE for details.
//
// Based on code copyright 2018 Google Inc. All Rights Reserved.
// Licensed under the Apache License, Version 2.0.
// http://www.apache.org/licenses/LICENSE-2.0
// See LICENSE-MDC for details.
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under these licenses is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the licenses for the specific language governing permissions and
// limitations under these licenses.
// 

@import "../animation/variables";
@import "../base/mixins";
@import "../rtl/mixins";
@import "../theme/variables";
@import "../theme/mixins";
@import "../typography/mixins";
@import "./mixins";
@import "./variables";

// Floating Label is intended for use by multiple components, but its styles should only be emitted once when bundled
@include mdc-base-emit-once("mdc-floating-label") {
  // postcss-bem-linter: define floating-label
  .mdc-floating-label {
    @include typography(subtitle1);

    position: absolute;
    bottom: 8px;
    left: 0;
    transform-origin: left top;
    transition:
      transform $mdc-floating-label-transition-duration $mdc-animation-standard-curve-timing-function,
      color $mdc-floating-label-transition-duration $mdc-animation-standard-curve-timing-function;
    line-height: 1.15rem;
    cursor: text;

    @include mdc-rtl {
      right: 0;
      left: auto;
      transform-origin: right top;
    }
  }

  .mdc-floating-label--float-above {
    cursor: auto;
  }

  @at-root {
    @include mdc-floating-label-float-position($mdc-floating-label-position-y);
    @include mdc-floating-label-shake-animation(standard);
  }

  @include mdc-floating-label-shake-keyframes(standard, $mdc-floating-label-position-y);
}
