@use '@angular/material' as mat;
@use 'sass:color';

/* You can add global styles to this file, and also import other style files */

$mat-sys-info-container: #e8f4f8;
$mat-sys-info: #006eb3;
$mat-sys-warning-container: #fff3cd;
$mat-sys-warning: #ff9800;
$mat-sys-error-container: #ffebee;
$mat-sys-error: #d32f2f;

$mat-sys-info-container__dark: #2f516c;
$mat-sys-info__dark: #005ab3;
$mat-sys-warning-container__dark: color.invert(
  $mat-sys-warning-container,
  100%,
  $space: rgb
);
$mat-sys-warning__dark: color.invert($mat-sys-warning, 100%, $space: rgb);
$mat-sys-error-container__dark: color.invert(
  $mat-sys-error-container,
  100%,
  $space: rgb
);
$mat-sys-error__dark: color.invert($mat-sys-error, 100%, $space: rgb);

:root {
  --mat-sys-info-container: #{$mat-sys-info-container};
  --mat-sys-info: #{$mat-sys-info};
  --mat-sys-warning-container: #{$mat-sys-warning-container};
  --mat-sys-warning: #{$mat-sys-warning};
  --mat-sys-error-container: #{$mat-sys-error-container};
  --mat-sys-error: #{$mat-sys-error};

  @media (prefers-color-scheme: dark) {
    --mat-sys-info-container: #{$mat-sys-info-container__dark};
    --mat-sys-info: #{$mat-sys-info__dark};
    --mat-sys-warning-container: #{$mat-sys-warning-container__dark};
    --mat-sys-warning: #{$mat-sys-warning__dark};
    --mat-sys-error-container: #{$mat-sys-error-container__dark};
    --mat-sys-error: #{$mat-sys-error__dark};
  }
}

html {
  color-scheme: light dark;
  @include mat.theme(
    (
      color: mat.$orange-palette,
      typography: Roboto,
      density: 0,
    )
  );
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Roboto, 'Helvetica Neue', sans-serif;
  line-height: 1.75rem;
}

code.inline-code {
  padding: 0.1rem 0.25rem;
  background-color: var(--mat-sys-surface-container);
  border-radius: 0.25rem;
  border: 1px solid var(--mat-sys-surface-variant);
}

.spacer {
  display: block;
  padding: 1rem;
}

.spacer::after {
  content: ' ';
}

.api-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding-bottom: 1.5rem;
  h1 {
    margin-bottom: 0;
  }
}
h3.import-path {
  display: inline-flex;
  background-color: var(--mat-sys-surface-container);
  border-radius: 0.25rem;
  border: 1px solid var(--mat-sys-surface-variant);
  align-items: center;
  font-size: 0.75rem;
  gap: 0.5rem;
  padding: 0.5rem;
  margin-bottom: 1rem;
  font-family: monospace;
}
