/* opensheet — small residual stylesheet. Bootstrap covers layout, colors,
   forms, cards, tables. This file only holds the bits Bootstrap doesn't. */

/* htmx sets .htmx-request on the trigger while a request is in flight. */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { display: inline-block; }

/* Text you can triple-click to select in one go — API URLs, tokens. */
.copyable { user-select: all; word-break: break-all; }

/* Sticky sidebar for the sheet detail two-column layout. Position stays put
   only when the viewport is tall enough for the offset to make sense. */
@media (min-width: 992px) {
  .sidebar-nav { position: sticky; top: 1rem; }
}

/* Show the moon icon in dark theme, sun in light. Keeps a single button. */
:root[data-bs-theme="dark"] .theme-icon-dark { display: inline; }
:root[data-bs-theme="dark"] .theme-icon-light { display: none; }
:root[data-bs-theme="light"] .theme-icon-dark { display: none; }
:root[data-bs-theme="light"] .theme-icon-light { display: inline; }

/* Method badge — coloured tag next to each API endpoint. */
.method-get    { background: var(--bs-info-bg-subtle);    color: var(--bs-info-text-emphasis); }
.method-post   { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.method-patch  { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.method-delete { background: var(--bs-danger-bg-subtle);  color: var(--bs-danger-text-emphasis); }
.method-badge {
  display: inline-block; min-width: 4.5rem;
  padding: 0.15rem 0.5rem; border-radius: 0.375rem;
  font-family: var(--bs-font-monospace); font-size: 0.75rem; font-weight: 600;
  text-align: center; text-transform: uppercase; letter-spacing: 0.04em;
}

/* Tight monospace block for cURL examples. The right padding reserves space
   for the overlaid Copy button (position:absolute top-right) so wrapped text
   never runs under it. */
.code-block {
  display: block;
  padding: 0.75rem 5.75rem 0.75rem 0.9rem;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  font-family: var(--bs-font-monospace);
  font-size: 0.8125rem;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
}
