/* Real bold face for the body font; without it bold text is only synthesized from Neptune Light and barely visible. */
@font-face {
  font-family: "Neptune Light";
  font-style: normal;
  font-weight: 700;
  src: url(/fonts/Neptune-Medium.woff2) format("woff2"), url(/fonts/Neptune-Medium.woff) format("woff");
}

cosmo-parrot,
.cosmo-parrot {
  display: block;
  margin: 1.5rem 0;
}

.cosmo-parrot__open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  cursor: pointer;
  border: 1px solid #0067b1;
  border-radius: 0.35rem;
  background: #0067b1;
  color: #fff;
  font: inherit;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.cosmo-parrot__open:hover {
  border-color: #00558f;
  background: #00558f;
}

.cosmo-parrot__open:active {
  border-color: #004a7d;
  background: #004a7d;
}

.cosmo-parrot__open:focus-visible,
.cosmo-parrot-modal__close:focus-visible {
  outline: 3px solid #f6c344;
  outline-offset: 3px;
}

.cosmo-parrot-open {
  overflow: hidden;
}

.cosmo-parrot-modal {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 1rem;
  background: rgb(0 0 0 / 55%);
}

.cosmo-parrot-modal__dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(68.75rem, 100%);
  height: min(90dvh, 56.25rem);
  overflow: hidden;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.5rem;
  background: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #212529);
  box-shadow: 0 1.25rem 4rem rgb(0 0 0 / 35%);
}

.cosmo-parrot-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

.cosmo-parrot-modal__header strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cosmo-parrot-modal__close {
  display: inline-grid;
  flex: 0 0 2.25rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  cursor: pointer;
  border: 1px solid var(--bs-border-color, #adb5bd);
  border-radius: 0.25rem;
  background: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #212529);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  place-items: center;
}

.cosmo-parrot-modal__close:hover {
  background: var(--bs-tertiary-bg, #f1f3f5);
}

.cosmo-parrot-modal__iframe {
  width: calc(100% - 1.5rem);
  height: 100%;
  border: 0;
  background: #fff;
  justify-self: center;
  padding: 1rem 0;
}

@media (max-width: 575.98px) {
  .cosmo-parrot-modal {
    padding: 0.5rem;
  }

  .cosmo-parrot-modal__dialog {
    width: 100%;
    height: calc(100dvh - 1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cosmo-parrot__open {
    transition: none;
  }
}

/* Code blocks as framed boxes: the docfx grey (#f5f5f5) was barely visible on the grey CPA background (I-00398). */
article pre:not(.mermaid) {
  border: 1px solid #c9cfd4;
  background: #fff;
}

article pre > code,
article pre > code.hljs {
  padding: 1em;
  background: transparent;
}

article pre.has-line-numbers {
  display: flex;
}

article pre.has-line-numbers > code {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
}

/* Same font and vertical padding as the code, so each number stays on its line. */
article pre > .code-line-numbers {
  flex: 0 0 auto;
  padding: 1em 0.75em;
  border-right: 1px solid #c9cfd4;
  background: #eef1f3;
  color: #6c757d;
  text-align: right;
  user-select: none;
}

[data-bs-theme="dark"] article pre:not(.mermaid) {
  border-color: #495057;
  background: #1e1e1e;
}

[data-bs-theme="dark"] article pre > .code-line-numbers {
  border-right-color: #495057;
  background: #2b3035;
  color: #adb5bd;
}

/* Inside the CPA iframe 100vh is the iframe's own height, so the iframe could never shrink after a long article. */
html.cpa-embedded,
html.cpa-embedded body {
  min-height: 0;
}

/* Keep wheel scrolling at the end of the TOC from scrolling the article. */
body > main > .toc-offcanvas,
body > main > .affix {
  overscroll-behavior: contain;
}

@media print {
  cosmo-parrot,
  .cosmo-parrot,
  .cosmo-parrot-modal {
    display: none !important;
  }
}
