/*
 * Copyright (C) 2024 BIRU
 *
 * This file is part of Tenzu.
 *
 * Tenzu is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Affero General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
 *
 * You can contact BIRU at ask@biru.sh
 *
 */

@use '@angular/material' as mat;

.mdc-switch__track {
  box-shadow: 0 0 3px var(--mat-sys-primary);;
}
.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after {
  opacity: .50;
}
.mat-mdc-slide-toggle .mdc-label {
  @apply whitespace-nowrap;
}

  @mixin tokens-overrides() {
  @include mat.slide-toggle-overrides((
    track-outline-color: var(--mat-sys-primary),
    selected-track-outline-color: var(--mat-sys-primary),
    unselected-handle-color: var(--mat-sys-primary-container),
    unselected-hover-handle-color: var(--mat-sys-primary),
    unselected-focus-handle-color: var(--mat-sys-primary),
    unselected-pressed-handle-color: var(--mat-sys-primary),
    selected-handle-color: var(--mat-sys-primary-container),
    selected-hover-handle-color: var(--mat-sys-primary),
    selected-focus-handle-color: var(--mat-sys-primary),
    selected-pressed-handle-color: var(--mat-sys-primary),
    unselected-focus-state-layer-color: var(--mat-sys-primary-container),
    unselected-hover-state-layer-color: var(--mat-sys-primary-container),
    unselected-pressed-state-layer-color: var(--mat-sys-primary-container),
    selected-focus-state-layer-color: var(--mat-sys-primary-container),
    selected-hover-state-layer-color: var(--mat-sys-primary-container),
    selected-pressed-state-layer-color: var(--mat-sys-primary-container),
    track-width: 40px,
    track-height: 22px,
    with-icon-handle-size: 16px,
    selected-with-icon-handle-horizontal-margin: 0 calc(var(--mdc-switch-track-width) - var(--mat-switch-with-icon-handle-size) - var(--mat-switch-track-outline-width)),
    label-text-size: label-small-size,
    label-text-color: var(--mat-sys-on-surface-variant),
    selected-icon-size: 14px,
    unselected-icon-size: 14px,
  ));
}
