/*
 * Copyright (C) 2024-2025 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-radio {
    .mat-mdc-radio-touch-target {
      width: 36px;
      height: 36px;
    }
    .mdc-radio__outer-circle {
      box-shadow: 0 0 3px var(--mat-sys-primary);
    }
    .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle {
      box-shadow: 0 0 6px var(--mat-sys-primary);
    }
    .mdc-radio__native-control:focus:enabled:not(:checked) ~ .mdc-radio__background .mdc-radio__outer-circle {
      border-color: var(--mat-sys-primary);
    }
  }


@mixin tokens-overrides() {
  @include mat.radio-overrides((
    state-layer-size: 32px,
    selected-icon-color: var(--mat-sys-primary),
    selected-focus-icon-color: var(--mat-sys-primary),
    selected-hover-icon-color: var(--mat-sys-on-primary),
    selected-pressed-icon-color: var(--mat-sys-on-primary-container),
    unselected-icon-color: var(--mat-sys-primary),
    unselected-hover-icon-color: var(--mat-sys-on-primary),
    unselected-pressed-icon-color: var(--mat-sys-on-primary-container),
    label-text-size: var(--mat-sys-label-large-size),
    label-text-color: var(--mat-sys-on-surface),
    disabled-label-color: var(--mat-sys-on-surface),
    label-text-line-height: var(--mat-sys-label-large-line-height),
    label-text-weight: var(--mat-sys-label-large-line-weight),
    ripple-color: var(--mat-sys-on-primary-container),
    checked-ripple-color: var(--mat-sys-on-primary-container)
  ));
  .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle {
    @include mat.radio-overrides((
      selected-icon-color: var(--mat-sys-on-primary),
      selected-focus-icon-color: var(--mat-sys-on-primary-container),
      selected-hover-icon-color: var(--mat-sys-on-primary-container),
      selected-pressed-icon-color: var(--mat-sys-on-primary-container),
    ));
  }
}
