//
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

// postcss-bem-linter: define icon-toggle

@import "@material/animation/functions";
@import "@material/ripple/common";
@import "@material/ripple/mixins";
@import "@material/theme/mixins";
@import "./mixins";

.mdc-icon-toggle {
  @include mdc-ripple-surface;
  @include mdc-ripple-radius-unbounded;
  @include mdc-states(black);
  @include mdc-icon-toggle-ink-color(text-primary-on-light);

  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  padding: 12px;
  outline: none;
  font-size: 1.5rem;
  cursor: pointer;
  user-select: none;
  // For some reason, GPU layer promotion makes ripples look terrible on Chrome

  /* @alternate */
  will-change: initial;

  &::after {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    content: "";
  }
}

.mdc-icon-toggle--disabled {
  @include mdc-theme-prop(color, text-disabled-on-light);

  pointer-events: none;
}

// postcss-bem-linter: end
