/**
 * @license EUPL-1.2
 * Copyright (c) 2020-2024 Frameless B.V.
 * Copyright (c) 2021-2024 Gemeente Utrecht
 */

@mixin reset-font-smoothing {
  /* reset `font-smoothing: antialiasing`, prefer automatic (`subpixel-antialiasing`) behavior for high-dpi screens */
  -webkit-font-smoothing: auto !important;
  -moz-osx-font-smoothing: auto !important;
}

@mixin utrecht-document {
  @include reset-font-smoothing;

  color: var(--utrecht-document-color, inherit);
  font-family: var(--utrecht-document-font-family, inherit);
  font-size: var(--utrecht-document-font-size, inherit);
  font-weight: var(--utrecht-document-font-weight, inherit);
  line-height: var(--utrecht-document-line-height, inherit);
  text-rendering: optimizeLegibility;
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;

  :lang(ar) {
    /* `letter-spacing` design tokens break Arabic text rendering, avoid that */
    letter-spacing: 0 !important;
  }
}

@mixin utrecht-document--surface {
  background-color: var(--utrecht-document-background-color, inherit);
}
