@use 'sass:map';
@use '@ecl/theme-eu/theme' as theme;
@use '@ecl/theme-eu/variables' as var;

// Layout
@use '@ecl/vanilla-layout-grid/mixins/breakpoints' with (
  $theme: theme.$theme
);
@use '@ecl/vanilla-component-blockquote/blockquote-print' with (
  $theme: theme.$theme,
  $blockquote: var.$blockquote,
  $blockquote-print: var.$blockquote-print
);
@use '@ecl/vanilla-component-button/button-print' with (
  $theme: theme.$theme,
  $button: var.$button
);
@use '@ecl/vanilla-component-description-list/description-list-print' with (
  $theme: theme.$theme,
  $description-list: var.$description-list,
  $description-list-print: var.$description-list-print
);
@use '@ecl/vanilla-component-link/link-print' with (
  $theme: theme.$theme,
  $link: var.$link
);
@use '@ecl/vanilla-component-ordered-list/ordered-list-print' with (
  $theme: theme.$theme,
  $list: var.$list
);
@use '@ecl/vanilla-component-separator/separator-print' with (
  $theme: theme.$theme,
  $separator: var.$separator
);
@use '@ecl/vanilla-component-table/table-print' with (
  $theme: theme.$theme,
  $table: var.$table
);
@use '@ecl/vanilla-component-unordered-list/unordered-list-print' with (
  $theme: theme.$theme,
  $list: var.$list
);
@use '@ecl/vanilla-utility-typography/typography-print' with (
  $theme: theme.$theme,
  $typography: var.$typography,
  $typography-print: var.$typography-print
);

html {
  font-family: #{map.get(theme.$font-family-print, 'default')};
}

// stylelint-disable no-descending-specificity
.ecl button:not([class*='ecl-'], [class*='wt-']),
.ecl button:is([class*='ecl-u-']) {
  @extend %ecl-button;
}

.ecl a:not([class*='ecl-'], [class*='wt-']),
.ecl a:is([class*='ecl-u-']) {
  @extend %ecl-link;

  font-family: #{map.get(theme.$font-family, 'default')};
}

.ecl h1:not([class*='ecl-'], [class*='wt-']),
.ecl h1:is([class*='ecl-u-']) {
  @extend %ecl-heading-1;
}

.ecl h2:not([class*='ecl-'], [class*='wt-']),
.ecl h2:is([class*='ecl-u-']) {
  @extend %ecl-heading-2;
}

.ecl h3:not([class*='ecl-'], [class*='wt-']),
.ecl h3:is([class*='ecl-u-']) {
  @extend %ecl-heading-3;
}

.ecl h4:not([class*='ecl-'], [class*='wt-']),
.ecl h4:is([class*='ecl-u-']) {
  @extend %ecl-heading-4;
}

.ecl h5:not([class*='ecl-'], [class*='wt-']),
.ecl h5:is([class*='ecl-u-']) {
  @extend %ecl-heading-5;
}

.ecl h6:not([class*='ecl-'], [class*='wt-']),
.ecl h6:is([class*='ecl-u-']) {
  @extend %ecl-heading-6;
}

.ecl hr:not([class*='ecl-'], [class*='wt-']),
.ecl hr:is([class*='ecl-u-']) {
  @extend %ecl-separator;
}

.ecl p:not([class*='ecl-'], [class*='wt-']),
.ecl p:is([class*='ecl-u-']) {
  @extend %ecl-paragraph;
}

.ecl ul:not([class*='ecl-'], [class*='wt-'], [class*='highcharts-']),
.ecl ul:is([class*='ecl-u-']) {
  @extend %ecl-unordered-list;
}

.ecl ul ul:not([class*='ecl-'], [class*='wt-'], [class*='highcharts-']),
.ecl ul ul:is([class*='ecl-u-']),
.ecl ul ol:not([class*='ecl-'], [class*='wt-'], [class*='highcharts-']),
.ecl ul ol:is([class*='ecl-u-']) {
  @extend %ecl-unordered-list--nested;
}

.ecl ul li:not([class*='ecl-'], [class*='wt-'], [class*='highcharts-']),
.ecl ul li:is([class*='ecl-u-']) {
  @extend %ecl-unordered-list__item;
}

.ecl ul ol li:not([class*='ecl-'], [class*='wt-'], [class*='highcharts-']),
.ecl ul ol li:is([class*='ecl-u-']) {
  margin-inline-start: 0;
}

.ecl ol:not([class*='ecl-'], [class*='wt-']),
.ecl ol:is([class*='ecl-u-']) {
  @extend %ecl-ordered-list;
}

.ecl ol ol:not([class*='ecl-'], [class*='wt-']),
.ecl ol ol:is([class*='ecl-u-']),
.ecl ol ul:not([class*='ecl-'], [class*='wt-']),
.ecl ol ul:is([class*='ecl-u-']) {
  @extend %ecl-ordered-list--nested;
}

.ecl ol li:not([class*='ecl-'], [class*='wt-']),
.ecl ol li:is([class*='ecl-u-']) {
  @extend %ecl-ordered-list__item;
}

.ecl dl:not([class*='ecl-'], [class*='wt-']),
.ecl dl:is([class*='ecl-u-']) {
  @extend %ecl-description-list;
}

.ecl dt:not([class*='ecl-'], [class*='wt-']),
.ecl dt:is([class*='ecl-u-']) {
  @extend %ecl-description-list__term;
}

.ecl dd:not([class*='ecl-'], [class*='wt-']),
.ecl dd:is([class*='ecl-u-']) {
  @extend %ecl-description-list__definition;
}

.ecl table:not([class*='ecl-'], [class*='wt-']),
.ecl table:is([class*='ecl-u-']) {
  @extend %ecl-table;
}

.ecl thead:not([class*='ecl-'], [class*='wt-']),
.ecl thead:is([class*='ecl-u-']) {
  @extend %ecl-table__head;

  & + tbody tr:first-child {
    border-top-width: 0;
  }
}

.ecl th:not([class*='ecl-'], [class*='wt-']),
.ecl th:is([class*='ecl-u-']) {
  @extend %ecl-table__header;
}

.ecl tr:not([class*='ecl-'], [class*='wt-']),
.ecl tr:is([class*='ecl-u-']) {
  @extend %ecl-table__row;
}

.ecl td:not([class*='ecl-'], [class*='wt-']),
.ecl td:is([class*='ecl-u-']) {
  @extend %ecl-table__cell;
}

.ecl blockquote:not([class*='ecl-'], [class*='wt-']),
.ecl blockquote:is([class*='ecl-u-']) {
  @extend %ecl-blockquote;

  &::before,
  &::after {
    display: none;
  }
}

.ecl blockquote cite:not([class*='ecl-'], [class*='wt-']),
.ecl blockquote cite:is([class*='ecl-u-']) {
  @extend %ecl-blockquote__author;

  display: block;
}
