//
// 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.
// 

// postcss-bem-linter: define icon-toggle

@import "../animation/functions";
@import "../ripple/common";
@import "../ripple/mixins";
@import "../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
