.navds-list ul,
.navds-list ol {
  padding: 0;
  margin-block: var(--ax-spacing-4);
}

.navds-list--small ul,
.navds-list--small ol {
  margin-block: var(--ax-spacing-3);
}

.navds-list {
  & .navds-list :where(ul, ol) {
    margin-block: var(--ax-spacing-2) 0;
  }

  & ol {
    list-style: decimal; /* This is the default value, but some frameworks have `ol,ul { list-style:none }` */
    padding-left: 1.7rem;

    & > .navds-list__item {
      padding-left: 0.3rem;
    }

    & li::marker {
      font-weight: var(--ax-font-weight-bold);
    }
  }

  & ul {
    & > .navds-list__item {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: var(--ax-spacing-2);
    }

    & > li > .navds-list__item-marker {
      display: flex;
      align-items: center;
      height: var(--ax-font-line-height-xlarge);
    }
  }
}

/* SAFARI HACK START */
/* stylelint-disable selector-type-no-unknown */

_::-webkit-full-page-media,
_:future,
:root .navds-list ol {
  padding-left: 2.1rem;
}

_::-webkit-full-page-media,
_:future,
:root .navds-list ol .navds-list__item {
  padding-left: 0;
}

/* SAFARI HACK END */
/* stylelint-enable selector-type-no-unknown */

.navds-list__item {
  margin-block-end: var(--ax-spacing-2);

  &:last-child {
    margin-block-end: 0;
  }
}

.navds-list__item-marker {
  width: 1.5rem;
}

.navds-list--small ul > li > .navds-list__item-marker {
  height: var(--ax-font-line-height-large);
}

.navds-list__item-marker--bullet {
  padding-left: 0.8rem;
}

.navds-list__item-marker--icon {
  font-size: 1.5rem;
  justify-content: center;
}
