/* Structured hover/focus popup for README intro bullets. */
.in-index-entry {
  cursor: help;
  display: inline-block;
  position: relative;
  text-decoration: underline dotted;
}

.in-index-tooltip {
  background: var(--md-default-bg-color);
  border: 0.05rem solid var(--md-default-fg-color--light);
  border-radius: 0.3rem;
  box-shadow: var(--md-shadow-z2);
  color: var(--md-default-fg-color);
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  left: 0;
  line-height: 1.45;
  max-width: min(34rem, calc(100vw - 2rem));
  opacity: 0;
  padding: 0.75rem 1rem;
  pointer-events: none;
  position: absolute;
  text-align: left;
  top: calc(100% + 0.5rem);
  transform: translateY(-0.25rem);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
  visibility: hidden;
  white-space: normal;
  width: max-content;
  overflow-wrap: anywhere;
  z-index: 100;
}

.in-index-entry:hover .in-index-tooltip,
.in-index-entry:focus .in-index-tooltip,
.in-index-entry:focus-within .in-index-tooltip {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.in-index-tooltip-title,
.in-index-tooltip-heading,
.in-index-tooltip-item {
  display: block;
}

.in-index-tooltip-title {
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.in-index-tooltip-heading {
  font-weight: 700;
  margin-top: 0.45rem;
}

.in-index-tooltip-item {
  font-weight: 400;
}

/* Compact, editor-like disclosure rows for suites, themes, and types. */
.md-typeset details.bcp-suite,
.md-typeset details.spec-theme,
.md-typeset details.spec-type {
  background: transparent !important;
  border: 0;
  box-shadow: none !important;
  margin: 0.15rem 0;
  padding: 0;
}

.md-typeset details.bcp-suite > summary,
.md-typeset details.spec-theme > summary,
.md-typeset details.spec-type > summary {
  background: transparent !important;
  border: 0;
  border-radius: 0.2rem;
  cursor: pointer;
  display: list-item;
  list-style: none !important;
  margin: 0 !important;
  padding: 0.2rem 0.4rem !important;
}

.md-typeset details.bcp-suite > summary::after,
.md-typeset details.spec-theme > summary::after,
.md-typeset details.spec-type > summary::after {
  content: none !important;
  display: none !important;
}

.md-typeset details.bcp-suite > summary::before,
.md-typeset details.spec-theme > summary::before,
.md-typeset details.spec-type > summary::before {
  background: transparent !important;
  border-bottom: 0.3rem solid transparent !important;
  border-left: 0.4rem solid var(--md-primary-fg-color) !important;
  border-top: 0.3rem solid transparent !important;
  content: "" !important;
  display: inline-block !important;
  height: 0 !important;
  margin-right: 0.45rem;
  mask-image: none !important;
  position: static !important;
  transform-origin: 25% 50%;
  transition: transform 120ms ease;
  vertical-align: -0.05rem;
  width: 0 !important;
}

.md-typeset details.bcp-suite[open] > summary::before,
.md-typeset details.spec-theme[open] > summary::before,
.md-typeset details.spec-type[open] > summary::before {
  transform: rotate(90deg);
}

.md-typeset details.bcp-suite > summary:hover,
.md-typeset details.bcp-suite > summary:focus-visible,
.md-typeset details.spec-theme > summary:hover,
.md-typeset details.spec-theme > summary:focus-visible,
.md-typeset details.spec-type > summary:hover,
.md-typeset details.spec-type > summary:focus-visible {
  background: var(--md-default-fg-color--lightest);
}

.md-typeset details.bcp-suite > summary::marker,
.md-typeset details.spec-theme > summary::marker,
.md-typeset details.spec-type > summary::marker {
  color: var(--md-primary-fg-color);
  content: "▸ ";
}

.md-typeset details.bcp-suite[open] > summary::marker,
.md-typeset details.spec-theme[open] > summary::marker,
.md-typeset details.spec-type[open] > summary::marker {
  content: "▾ ";
}

.md-typeset details.bcp-suite > ul {
  margin: 0.15rem 0 0.5rem 1.8rem;
}

.md-typeset details.spec-type > details.bcp-suite {
  margin-left: 0.8rem;
}

.md-typeset details.spec-theme > p,
.md-typeset details.spec-type > p {
  margin: 0.75rem 0.4rem;
}

/* Keep the specification index tables expanded, as on the Increment index. */
.md-typeset table.in-index-table {
  display: table !important;
  max-width: none !important;
  overflow: visible !important;
  table-layout: fixed;
  width: 100% !important;
}

.md-typeset table.in-index-table th,
.md-typeset table.in-index-table td {
  overflow-wrap: anywhere;
}

/* Generated tag-cloud styling for the specification index. */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 2rem;
}

.tag-cloud a {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 999px;
  text-decoration: none;
}

.tag-cloud a:hover {
  border-color: var(--md-primary-fg-color);
}

.tag-cloud small {
  opacity: 0.7;
}
