/* MailsByte API reference — Stripe-style docs chrome */
.docs-body { min-height: 100vh; }
.docs-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }

.docs-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2rem;
  padding: 0.5rem 0 4.5rem;
  align-items: start;
}

.docs-side {
  position: sticky;
  top: 5.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-right: 0.5rem;
}

.docs-side a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.42rem 0.65rem;
  border-radius: 0.55rem;
  border-left: 2px solid transparent;
}

.docs-side a:hover,
.docs-side a.is-on {
  color: #fff;
  background: rgba(255,255,255,0.05);
  border-left-color: #ffd978;
}

.docs-side .docs-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0.85rem 0.65rem 0.3rem;
}

.docs-hero h1 {
  margin: 0.2rem 0 0.55rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  color: #fff;
}

.docs-hero p { color: var(--muted); max-width: 40rem; line-height: 1.6; }

.docs-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1rem 0 1.6rem; }
.docs-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  color: #ffd978;
  background: rgba(255,217,120,0.08);
}

.docs-callout {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid rgba(168, 85, 247, 0.28);
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(168,85,247,0.08));
  margin-bottom: 2rem;
}

.docs-base {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: #7dd3fc;
}

.docs-copy {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.7rem;
  border-radius: 0.55rem;
  cursor: pointer;
}
.docs-copy:hover { background: rgba(255,255,255,0.1); }
.docs-copy.is-on { color: #5ee9a8; border-color: rgba(94,233,168,0.35); }

.docs-h2 {
  margin: 2.4rem 0 0.75rem;
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: -0.02em;
  scroll-margin-top: 5.5rem;
}

.docs-h2:first-of-type { margin-top: 0.4rem; }

.docs-p { color: var(--muted); line-height: 1.65; }

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin: 0.8rem 0 1.2rem;
}
.docs-table th,
.docs-table td {
  text-align: left;
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  vertical-align: top;
}
.docs-table th { color: var(--faint); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; }
.docs-table td { color: var(--muted); }
.docs-table code { color: #ffd978; font-size: 0.8rem; }

.docs-ep {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.95fr);
  gap: 1.1rem;
  margin: 0 0 2.4rem;
  scroll-margin-top: 5.5rem;
}

.docs-ep-copy h3 { margin: 0.35rem 0 0.55rem; color: #fff; font-size: 1.15rem; }
.docs-path {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}
.docs-path code {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: #fff;
  word-break: break-all;
}
.docs-verb {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.45rem;
  border-radius: 0.35rem;
  color: #04120c;
}
.docs-verb.get { background: #34d399; }
.docs-verb.post { background: #60a5fa; color: #071018; }
.docs-verb.delete { background: #fb7185; color: #1a0610; }
.docs-cost {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--faint);
}

.docs-code {
  border-radius: 0.95rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: #0b0814;
  overflow: hidden;
  min-width: 0;
}
.docs-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem 0.45rem 0.65rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
}
.docs-tabs { display: flex; gap: 0.2rem; flex-wrap: wrap; }
.docs-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.32rem 0.5rem;
  border-radius: 0.45rem;
  cursor: pointer;
}
.docs-tab.is-on { background: rgba(255,255,255,0.08); color: #fff; }
.docs-code pre {
  margin: 0;
  padding: 0.9rem 1rem 1.05rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.55;
  color: #c4f5d8;
  overflow: auto;
  white-space: pre;
  max-height: 22rem;
}
.docs-stack { display: flex; flex-direction: column; gap: 0.65rem; min-width: 0; }
.docs-code-res pre { color: #86efac; }
.docs-code-body pre { color: #fde68a; }
.docs-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0.15rem 0.35rem;
}

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-side {
    position: relative;
    top: 0;
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: auto;
  }
  .docs-ep { grid-template-columns: 1fr; }
}

html.light-theme .docs-hero h1,
html[data-theme='light'] .docs-hero h1,
html.light-theme .docs-h2,
html[data-theme='light'] .docs-h2,
html.light-theme .docs-ep-copy h3,
html[data-theme='light'] .docs-ep-copy h3,
html.light-theme .docs-path code,
html[data-theme='light'] .docs-path code,
html.light-theme .docs-side a.is-on,
html[data-theme='light'] .docs-side a.is-on,
html.light-theme .docs-tab.is-on,
html[data-theme='light'] .docs-tab.is-on { color: #161022; }

html.light-theme .docs-hero p,
html[data-theme='light'] .docs-hero p,
html.light-theme .docs-p,
html[data-theme='light'] .docs-p,
html.light-theme .docs-side a,
html[data-theme='light'] .docs-side a,
html.light-theme .docs-table td,
html[data-theme='light'] .docs-table td { color: rgba(22, 16, 34, 0.74); }

html.light-theme .docs-code,
html[data-theme='light'] .docs-code {
  background: #1a1428;
  border-color: rgba(22, 16, 34, 0.12);
}
html.light-theme .docs-copy,
html[data-theme='light'] .docs-copy {
  color: #161022;
  background: #fff;
  border-color: rgba(60, 30, 90, 0.16);
}
html.light-theme .docs-callout,
html[data-theme='light'] .docs-callout {
  background: #fff;
  border-color: rgba(91, 63, 196, 0.2);
}
