/* Collapsible <details> blocks styled like a note callout. */
details {
  border: 1px solid #d0d7de;
  border-left: 4px solid #0094d4;
  border-radius: 6px;
  padding: 0.6em 1em;
  margin: 1em 0;
  background: #f7fafd;
}

details > summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

details > summary::before {
  content: "\25B6";
  color: #0094d4;
  display: inline-block;
  margin-right: 0.5em;
  font-size: 0.8em;
  transition: transform 0.15s ease;
}

details[open] > summary::before {
  transform: rotate(90deg);
}

details[open] > summary {
  margin-bottom: 0.6em;
  border-bottom: 1px solid #e6ebf1;
  padding-bottom: 0.4em;
}

/* Content tables (reference pages + quarto vignettes): rounded outer border,
   tinted header row, comfortable padding. Ported from the sntutils site. */
table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1.25px solid #d0d7de;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.92rem;
}

table thead th {
  background-color: #eef2f5;
  color: #15263f;
  border-bottom: 1.5px solid #c5cdd4;
  font-weight: 600;
  text-align: left;
}

table td,
table th {
  padding: 6px 10px;
}

/* Dark mode: pkgdown's light-switch sets [data-bs-theme="dark"] on <html>. */
[data-bs-theme="dark"] table {
  border: 1.25px solid #2a3845;
}

[data-bs-theme="dark"] table thead th {
  background-color: #1a242f;
  color: #96c8e2;
  border-bottom: 1.5px solid #2a3845;
}

/* Quarto vignette tables: undo quarto's bare `table { display: block }` so the
   width shrinks to content, and let wide kable tables scroll in their wrapper.
   These run with overflow visible, so round the header corners by hand. */
.template-quarto main .kable-table {
  overflow-x: auto;
  margin: 1rem 0;
}

.template-quarto main table {
  display: table;
  overflow: visible;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  table-layout: auto;
  margin: 1rem 0;
}

.template-quarto main .kable-table table {
  margin: 0;
}

.template-quarto main table th:first-child {
  border-top-left-radius: 7px;
}
.template-quarto main table th:last-child {
  border-top-right-radius: 7px;
}

.template-quarto main table td {
  border-top: 1px solid #e3e9ee;
}

[data-bs-theme="dark"] .template-quarto main table td {
  border-top: 1px solid #2a3845;
}

.template-quarto main table tbody tr:last-child td {
  border-bottom: none;
}

/* Key/description tables: narrow first column, wide description column.
   Pandoc emits inline `<col style="width: 50%">`, so override with !important. */
.template-quarto main .desc-table table {
  width: 100%;
}
.template-quarto main .desc-table table col:first-child {
  width: 1% !important;
}
.template-quarto main .desc-table table col:last-child {
  width: auto !important;
}
.template-quarto main .desc-table table th:first-child,
.template-quarto main .desc-table table td:first-child {
  white-space: nowrap;
}
