/* Docs-page layout. Components live in /theme.css. */

html, body { height: 100%; }
.shell { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.shell > main { flex: 1; min-height: 0; overflow: auto; }
.page { padding-block: 1.5rem 4rem; }

a { color: inherit; }
p { margin: 0; }
code, pre { font-family: var(--font-mono); font-size: 0.8125rem; }

.header-end { display: flex; align-items: center; gap: 0.5rem; }
@media (min-width: 768px) { .header-end { margin-left: auto; } }
.header-end .select { width: 7.5rem; }

.intro { max-width: 42rem; color: var(--muted-foreground); }
.section { display: grid; gap: 0.75rem; }
.section-title { margin: 0; font-size: 1rem; line-height: 1.5rem; font-weight: 600; }

/* Bordered list/table */
.table {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-control);
  background: var(--card);
  border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: 0.875rem;
}
.table th, .table td { padding: 0.625rem 0.75rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: 0; }
.table th { font-weight: 500; color: var(--muted-foreground); background: var(--muted); }
.table td.muted { color: var(--muted-foreground); }
.table-scroll { overflow-x: auto; }
.nowrap { white-space: nowrap; }

.chip {
  display: inline-block; width: 1.25rem; height: 1.25rem; vertical-align: middle;
  border: 1px solid var(--input-strong); border-radius: 0.375rem;
}

.copy {
  border: 0; background: none; padding: 0; cursor: pointer; color: inherit;
  font-family: var(--font-mono); font-size: 0.8125rem; text-align: left;
  border-radius: 0.25rem; outline: none;
}
.copy:hover { text-decoration: underline; text-underline-offset: 3px; }
.copy:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent); }

pre.code {
  margin: 0; padding: 0.875rem 1rem; overflow-x: auto; line-height: 1.6;
  background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-control);
}

/* Component example rows */
.example { border: 1px solid var(--border); border-radius: var(--radius-control); overflow: hidden; background: var(--card); }
.example-body { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 1rem; }
.example-body.col { flex-direction: column; align-items: stretch; gap: 1rem; }
.example-code { border-top: 1px solid var(--border); background: var(--muted); padding: 0.625rem 1rem; overflow-x: auto; }
.example-code code { color: var(--muted-foreground); white-space: pre; }

/* Portal replica */
.inset { padding: 1.5rem 0; }
@media (min-width: 768px) { .inset { padding: 1.5rem; } }
.font-medium { font-weight: 500; }
.find-row { display: flex; gap: 0.75rem; align-items: flex-end; }
.find-row .input { flex: 1; min-width: 0; }
.loading-row { display: flex; align-items: center; gap: 0.5rem; }
.result-note { margin-top: 0.75rem; }
#find-result:not(:empty) { display: grid; gap: 0.75rem; justify-items: start; margin-top: 1rem; }
.result-dl { display: grid; grid-template-columns: 8rem 1fr; gap: 0.375rem 1rem; margin: 0; font-size: 0.875rem; }
.result-dl dt { color: var(--muted-foreground); }
.result-dl dd { margin: 0; overflow-wrap: anywhere; }
.show-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.gif-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.gif-title { display: flex; align-items: baseline; gap: 0.75rem; }
.gif-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.gif-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); }
.gif-grid:empty { display: none; }
.gif-tile { padding: 0; overflow: hidden; }
.gif-media { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--muted); }
.gif-foot { display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 0.75rem; }
.show-sep { width: 1px; height: 1.25rem; margin-inline: 0.25rem; background: var(--border); }
.show-row .input-compact { width: 15rem; }
@media (max-width: 767px) {
  .show-sep { display: none; }
  .show-row .input-compact, .show-row .select-compact { width: 100%; }
}
