/* Hehllo API user guide — small additions on top of Bootstrap 5.3 */
:root {
  --hh-brand: #3e4fb3;
  --hh-brand-soft: #eef0fb;
  --hh-code-bg: #1f2430;
  --hh-code-fg: #e6e6e6;
  --hh-sidebar-w: 260px;
}

body { font-size: 1rem; line-height: 1.65; }
.navbar-brand strong { color: var(--hh-brand); }
.text-brand { color: var(--hh-brand) !important; }
.bg-brand-soft { background: var(--hh-brand-soft); }

/* Layout: sticky sidebar on desktop, collapsible list on phones */
.docs-sidebar { position: sticky; top: 4.5rem; max-height: calc(100vh - 5rem); overflow-y: auto; }
.docs-sidebar .nav-link { color: #495057; padding: .35rem .75rem; border-radius: .375rem; font-size: .95rem; }
.docs-sidebar .nav-link:hover { background: var(--hh-brand-soft); color: var(--hh-brand); }
.docs-sidebar .nav-link.active { background: var(--hh-brand); color: #fff; }
.docs-sidebar .sidebar-heading { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: #868e96; margin: 1rem .75rem .25rem; }
.docs-content { max-width: 860px; }
.docs-content h2 { margin-top: 2.5rem; padding-top: .5rem; border-top: 1px solid #e9ecef; }
.docs-content h2:first-of-type { border-top: 0; margin-top: 1.5rem; }
.docs-content h3 { margin-top: 1.75rem; font-size: 1.2rem; }
[id] { scroll-margin-top: 5rem; }

/* Code */
pre.code { background: var(--hh-code-bg); color: var(--hh-code-fg); padding: 1rem 1.25rem; border-radius: .5rem;
  font-size: .85rem; line-height: 1.5; overflow-x: auto; white-space: pre; }
pre.code .c { color: #8b949e; }
pre.code .k { color: #79c0ff; }
pre.code .s { color: #a5d6ff; }
.code-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #6c757d; margin-bottom: .25rem; }
code { color: #c7254e; word-break: break-word; }
.method { display: inline-block; min-width: 4.2rem; text-align: center; font-weight: 700; font-size: .75rem;
  padding: .2rem .45rem; border-radius: .3rem; color: #fff; font-family: var(--bs-font-monospace); }
.method.get { background: #2f80ed; } .method.post { background: #27ae60; }
.method.patch { background: #e2a03f; } .method.delete { background: #d6293e; }

/* Steps */
.step { display: flex; gap: 1rem; margin: 1.25rem 0; }
.step-num { flex: 0 0 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--hh-brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; }
.step-body { flex: 1; min-width: 0; }

/* Screenshots */
figure.shot { margin: 1rem 0 1.5rem; }
figure.shot img { width: 100%; height: auto; border: 1px solid #dee2e6; border-radius: .5rem; box-shadow: 0 .25rem .75rem rgba(0,0,0,.06); }
figure.shot.tall img { max-height: 900px; object-fit: cover; object-position: top; }
figure.shot figcaption { font-size: .875rem; color: #6c757d; margin-top: .5rem; }

/* Flow diagram */
.flow { display: grid; gap: .75rem; }
.flow-row { display: flex; align-items: stretch; gap: .5rem; flex-wrap: wrap; }
.flow-box { flex: 1 1 10rem; border: 1px solid #dee2e6; border-radius: .5rem; padding: .75rem; background: #fff; font-size: .9rem; }
.flow-box .who { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #868e96; }
.flow-arrow { align-self: center; color: var(--hh-brand); font-weight: 700; }

.table-docs td, .table-docs th { font-size: .92rem; vertical-align: top; }
.callout { border-left: 4px solid var(--hh-brand); background: var(--hh-brand-soft); padding: .85rem 1rem; border-radius: .375rem; margin: 1rem 0; }
.callout.warn { border-color: #e2a03f; background: #fff7e8; }
.callout.danger { border-color: #d6293e; background: #fdecee; }

footer.docs-footer { font-size: .85rem; color: #868e96; }

@media (max-width: 991.98px) {
  .docs-sidebar { position: static; max-height: none; }
  .flow-arrow { transform: rotate(90deg); }
}

/* Language tabs for request examples */
.code-tabs { margin-bottom: 1rem; }
.code-tabs .nav-tabs { border-bottom: 0; }
.code-tabs .nav-link { font-size: .8rem; padding: .35rem .85rem; color: #6c757d; }
.code-tabs .nav-link.active { background: var(--hh-code-bg); color: var(--hh-code-fg); border-color: var(--hh-code-bg); }
.code-tabs pre.code { border-top-left-radius: 0; margin-bottom: 0; }
