/* Opt-in list presentation shared by the website and editor canvas. */
:is(ul, ol):is(.superdealen-list, .superdealen-number-list, .superdealen-check-list) {
  list-style: none;
  padding-left: 0;
}

/* The editor theme adds a marker gutter that custom markers do not need. */
.ck.ck-content :is(ul, ol):is(.superdealen-list, .superdealen-number-list, .superdealen-check-list) {
  margin-inline-start: 0;
}

ol:is(.superdealen-list, .superdealen-number-list) {
  --list-marker-size: 32px;
  --list-item-indent: 50px;
  --list-item-spacing: 16px;
  --list-marker-top: 0;
}

ul:is(.superdealen-list, .superdealen-check-list) {
  --list-marker-size: 20px;
  --list-item-indent: 36px;
  --list-item-spacing: 12px;
  --list-marker-top: 2px;
}

:is(ul, ol):is(.superdealen-list, .superdealen-number-list, .superdealen-check-list) > li {
  list-style-type: none;
  position: relative;
  padding-left: var(--list-item-indent);
  margin-bottom: var(--list-item-spacing);
}

/* CKEditor's content styles can restore native markers on the parent list. */
:is(ul, ol):is(.superdealen-list, .superdealen-number-list, .superdealen-check-list) > li::marker {
  content: "";
}

:is(ul, ol):is(.superdealen-list, .superdealen-number-list, .superdealen-check-list) > li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: var(--list-marker-top);
  width: var(--list-marker-size);
  height: var(--list-marker-size);
  border-radius: 50%;
  background: var(--superdealen-marker-color, #7b2cbf);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

ol:is(.superdealen-list, .superdealen-number-list) > li::before {
  content: counter(list-item);
  top: 50%;
  transform: translateY(-50%);
  line-height: 1;
  text-align: center;
  font-weight: 700;
}

/* A consistent white tick, independent of the text's font or font size. */
ul:is(.superdealen-list, .superdealen-check-list) > li::before {
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8l3.5 3.5L13 3.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
}
