/* Long generic signatures and member tables should scroll, not overflow the page */
.md-typeset pre > code {
  white-space: pre;
}

.md-typeset table:not([class]) {
  display: block;
  overflow-x: auto;
}

/* "On this page": show groups and members, but not Parameters/Returns under each member */
.md-nav--secondary .md-nav .md-nav {
  display: none;
}

/* Collapsible groups (Constructors, Properties, Methods, ...), see api-toc.js */
.md-nav--secondary .api-toc-group > .md-nav {
  display: none;
}

.md-nav--secondary .api-toc-group.api-toc-open > .md-nav {
  display: block;
}

.md-nav--secondary .api-toc-group > .md-nav__link::before {
  content: "\203A";
  display: inline-block;
  width: 0.8em;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.md-nav--secondary .api-toc-group.api-toc-open > .md-nav__link::before {
  transform: rotate(90deg);
}

/* Header label: extra.css (shared with the guides site) shows "Docs"; the API site shows its own name */
.md-header__topic:first-child .md-ellipsis::after {
  content: "API Reference";
}

/* Left menu: the generated nav starts with Home and the root namespace (OfficeOpenXml);
   every following top-level entry is a child namespace, so indent it to show the hierarchy.
   External links (release notes, breaking changes) at the end are not namespaces. */
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(n+3):not(:has(> a.md-nav__link[href^="https:"])) {
  margin-left: 0.8rem;
}

/* External links (NuGet, release notes on the main site): small icon after the text */
.md-typeset a.api-external::after {
  content: "";
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-left: 0.25em;
  vertical-align: -0.05em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E") no-repeat center / contain;
}