/**
 * Ordered list print
 * @define ordered-list
 */

@use 'sass:map';

// Exposed variables
$theme: null !default;
$list: null !default;

.ecl-ordered-list,
%ecl-ordered-list {
  color: map.get($list, 'text-color');
  font-family: var(--ecl-font-family-print-default);
  list-style-position: inside;
  margin: 0;
  padding: 0;
}

.ecl-ordered-list__item,
%ecl-ordered-list__item {
  margin-top: map.get($theme, 'spacing-print', 's');
  max-width: var(--max-w);

  .ecl-link {
    padding-top: map.get($theme, 'spacing-print', 's');
  }
}

.ecl-ordered-list__item--first {
  margin-top: 0;
}

.ecl-ordered-list--divider {
  > .ecl-ordered-list__item {
    border-bottom: 1px solid map.get($list, 'divider-color');
    padding-bottom: map.get($theme, 'spacing-print', 's');
  }

  .ecl-link {
    padding-top: 0;
  }
}

.ecl-ordered-list .ecl-ordered-list,
%ecl-ordered-list--nested {
  list-style-type: map.get($list, 'ordered', 'sublist-marker');
  margin-top: map.get($theme, 'spacing-print', 's');
  padding-inline-start: map.get($theme, 'spacing-print', 'l');
}

.ecl-ordered-list--no-marker,
.ecl-ordered-list--divider {
  list-style-type: none;
  padding-inline-start: 0;

  .ecl-ordered-list {
    list-style-type: none;
  }
}
