//
// Copyright 2016 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/ripple/common";
@import "@material/ripple/mixins";
@import "./mixins";
@import "./variables";

// postcss-bem-linter: define button
.mdc-button {
  @include mdc-button-base_;
  @include mdc-button-corner-radius(2px);
  @include mdc-button-container-fill-color(transparent);
  @include mdc-button-ink-color(primary);
  @include mdc-states(primary);

  // The icon CSS class overrides styles defined in the .material-icons CSS
  // class, which is loaded separately so the order of CSS definitions is not
  // guaranteed. Therefore, increase specifity by nesting this class to ensure
  // overrides apply.
  .mdc-button__icon {
    @include mdc-button__icon_;
  }

  // stylelint-disable-next-line selector-no-qualifying-type
  svg.mdc-button__icon {
    @include mdc-button__icon-svg_;
  }
}

.mdc-button--raised,
.mdc-button--unelevated,
.mdc-button--outlined {
  .mdc-button__icon {
    // Icons inside contained buttons have different styles due to increased button padding
    @include mdc-button__icon-contained_;
  }
}

.mdc-button--raised,
.mdc-button--unelevated {
  @include mdc-button--filled_;
  @include mdc-button-container-fill-color(primary);
  @include mdc-button-ink-color(on-primary);
  @include mdc-states(on-primary);
}

.mdc-button--raised {
  @include mdc-button--raised_;
}

.mdc-button--outlined {
  @include mdc-button--outlined_;
  @include mdc-button-outline-width(2px);
  @include mdc-button-outline-color(primary);
}

.mdc-button--dense {
  @include mdc-button--dense_;
}
// postcss-bem-linter: end
