/*
 * 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-dialog {
  @include mat.dialog-overrides((
    headline-padding: 0 16px 16px,
    content-padding: 12px 16px 0,
    with-actions-content-padding:  12px 16px 4px,
    actions-padding: 12px 16px,
  ))
}
.mat-mdc-dialog-panel {
  @include mat.dialog-overrides((
    container-min-width: min-content,
  ));
  &.aligned-center-to-anchor {
    @apply -translate-x-1/2;
  }
  &.aligned-left-to-anchor {
    @apply -translate-x-full;
  }
  &.above-anchor {
    @apply -translate-y-full;
  }
}
.cdk-overlay-dark-backdrop {
  background-color: rgba(0, 0, 0, 0.50);
}
.mat.get-theme-typography {
  font-size: var(--mat-sys-title-large-size);
}
.mat-mdc-dialog-surface {
  border-style: solid;
  border-color: var(--mat-sys-outline);
  border-width: 1px;
  border-bottom-width: 2px;
}

@mixin tokens-overrides() {
  @include mat.dialog-overrides((
    supporting-text-color: var(--mat-sys-on-surface),
    subhead-color: var(--mat-sys-on-background),
    container-shape: var(--mat-sys-corner-medium),
    container-elevation-shadow: var(--mat-sys-level2),
    container-color: var(--mat-sys-surface-container),
  ));
}
