/*
 * 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;

html {
  .mat-expansion-panel {
    border-style: solid;
    border-width: 1px;
    border-bottom-width: 2px;
    border-color:  var(--mat-sys-outline);
    &:not([class*=mat-elevation-z]) {
      box-shadow: var(--mat-sys-level1);
    }
    &:focus-within {
      outline: var(--mat-sys-primary) solid 4px;
      border-color:  var(--mat-sys-outline);
    }
    &:hover {
      border-color:  var(--mat-sys-primary);
    }
  }
  .mdc-dialog__content {
    .mat-expansion-panel:first-child {
      margin-top: 4px;
    }
  }
}

@mixin tokens-overrides() {
  @include mat.expansion-overrides((
    container-shape: var(--mat-sys-corner-medium),
    header-hover-state-layer-color: transparent,
    header-focus-state-layer-color: transparent,
    header-text-color: var(--mat-sys-on-background),
    container-text-color:  var(--mat-sys-on-background),
    header-description-color: var(--mat-sys-on-surface),
    header-indicator-color: var(--mat-sys-on-surface-variant),
    header-text-size: var(--mat-sys-body-large-size),
    header-text-weight: var(--mat-sys-body-large-weight),
    header-text-line-height: var(--mat-sys-body-large-line-height),
    container-text-size: var(--mat-sys-body-medium-size),
    container-text-weight: var(--mat-sys-body-medium-weight),
    container-text-line-height: var(--mat-sys-body-medium-line-height),
    container-background-color: var(--mat-sys-surface),
  ));
}
