/* Table of contents — editor + front */
.wp-block-custom-table-of-contents.sht-toc,
.sht-toc {
  --sht-toc-link-hover: var(--wp--preset--color--primary);
  box-sizing: border-box;
  font-size: var(--wp--preset--font-size--20);
  padding: 20px;
  border-radius: 0;
  background-color: #f7f7f7;
  color: var(--wp--preset--color--dark-gray);
  margin-bottom: 1.5rem;
}

.sht-toc__title {
  margin: 0 0 12px;
  padding: 0;
  font-weight: 700;
  font-size: inherit
  line-height: 1.2;
  color: var(--wp--preset--color--black);
}

.sht-toc__title--rich a {
  color: inherit;
  text-decoration: underline;
}

.sht-toc__title--rich strong,
.sht-toc__title--rich b {
  font-weight: 700;
}

.sht-toc__list {
  margin: 0;
  /* padding-left: 1.25em; */
  list-style: decimal;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.45;
}

.sht-toc__item {
  margin: 0 0 0.35em;
  padding: 0;
  color: inherit;
}

.sht-toc__item:last-child {
  margin-bottom: 0;
}

.sht-toc__item--level-3 {
  /* margin-left: 0.75rem; */
}

.sht-toc__item::marker {
  color: currentColor;
}

.sht-toc__link {
  color: currentColor;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.sht-toc__link:hover,
.sht-toc__link:focus {
  color: var(--sht-toc-link-hover, #ff0000);
  outline: none;
  text-decoration: none;
}

.sht-toc__link--empty {
  opacity: 0.5;
}

/* Editor */
.sht-toc--editor .sht-toc__editor-hint {
  margin: 0;
  font-size: 0.875rem;
  color: #757575;
}

.sht-toc--editor .sht-toc__list .sht-toc__link {
  cursor: default;
  pointer-events: none;
}

.sht-toc--editor .sht-toc__editor-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sht-toc--editor .sht-toc__editor-row .sht-toc__link {
  flex: 1 1 auto;
  min-width: 0;
}

.sht-toc--editor .sht-toc__exclude-btn {
  flex: 0 0 auto;
}

.sht-toc--editor .sht-toc__item--toc-excluded .sht-toc__link {
  opacity: 0.55;
}
