/* ==========================================================
   Entry Pass API Docs — Style
   Design: minimal, developer-focused
   ========================================================== */

/* ── THEME TOKENS ── */
:root {
  --sw: 252px;
  --hh: 54px;

  /* Backgrounds */
  --bg:          #ffffff;
  --bg-sidebar:  #f7f7f8;
  --bg-subtle:   #f4f4f5;
  --bg-code:     #18181b;
  --bg-endpoint: #f9f9fa;

  /* Text */
  --t1: #18181b;
  --t2: #52525b;
  --t3: #a1a1aa;

  /* Borders */
  --bd:  #e4e4e7;
  --bd2: #d4d4d8;

  /* Sidebar */
  --sb-bg:       #f7f7f8;
  --sb-bd:       #e4e4e7;
  --sb-t:        #52525b;
  --sb-sec:      #a1a1aa;
  --sb-hover:    #ebebed;
  --sb-act-bg:   rgba(180,83,9,.07);
  --sb-act-t:    #b45309;
  --sb-act-bar:  #d97706;

  /* Header */
  --hdr-bg: #ffffff;
  --hdr-bd: #e4e4e7;

  /* Accent */
  --ac:     #b45309;
  --ac-dim: rgba(180,83,9,.08);

  /* HTTP methods */
  --m-get-bg:  #f0fdf4;  --m-get-t:  #15803d;
  --m-post-bg: #eff6ff;  --m-post-t: #1d4ed8;
  --m-put-bg:  #fefce8;  --m-put-t:  #a16207;
  --m-del-bg:  #fff1f2;  --m-del-t:  #dc2626;

  /* Param badges */
  --b-req-bg:  #fff1f2;  --b-req-t:  #dc2626;
  --b-opt-bg:  #f0fdf4;  --b-opt-t:  #16a34a;
  --b-cond-bg: #fefce8;  --b-cond-t: #a16207;

  /* Callouts */
  --ci-bg: #eff6ff;  --ci-bd: #3b82f6;  --ci-t: #1e3a8a;
  --cw-bg: #fffbeb;  --cw-bd: #f59e0b;  --cw-t: #92400e;
  --cd-bg: #fff1f2;  --cd-bd: #ef4444;  --cd-t: #9f1239;
  --cs-bg: #f0fdf4;  --cs-bd: #22c55e;  --cs-t: #14532d;

  --rad: 6px;

  /* Backward-compat aliases used in inline styles */
  --text-3: var(--t3);
  --text-2: var(--t2);
  --text-1: var(--t1);
}

[data-theme="dark"] {
  --bg:          #0f0f0f;
  --bg-sidebar:  #111111;
  --bg-subtle:   #1a1a1a;
  --bg-code:     #090909;
  --bg-endpoint: #151515;

  --t1: #fafafa;
  --t2: #a1a1aa;
  --t3: #71717a;

  --bd:  #27272a;
  --bd2: #3f3f46;

  --sb-bg:      #111111;
  --sb-bd:      #27272a;
  --sb-t:       #a1a1aa;
  --sb-sec:     #52525b;
  --sb-hover:   #1c1c1c;
  --sb-act-bg:  rgba(251,191,36,.1);
  --sb-act-t:   #fbbf24;
  --sb-act-bar: #f59e0b;

  --hdr-bg: #0f0f0f;
  --hdr-bd: #27272a;

  --ac:     #fbbf24;
  --ac-dim: rgba(251,191,36,.1);

  --m-get-bg:  #052e16;   --m-get-t:  #4ade80;
  --m-post-bg: #0c1a2e;   --m-post-t: #93c5fd;
  --m-put-bg:  #1a1500;   --m-put-t:  #fbbf24;
  --m-del-bg:  #1a0000;   --m-del-t:  #f87171;

  --b-req-bg:  #1a0000;  --b-req-t:  #f87171;
  --b-opt-bg:  #052e16;  --b-opt-t:  #4ade80;
  --b-cond-bg: #1a1500;  --b-cond-t: #fbbf24;

  --ci-bg: rgba(59,130,246,.09);   --ci-bd: #3b82f6;  --ci-t: #93c5fd;
  --cw-bg: rgba(245,158,11,.08);   --cw-bd: #f59e0b;  --cw-t: #fcd34d;
  --cd-bg: rgba(239,68,68,.08);    --cd-bd: #ef4444;  --cd-t: #fca5a5;
  --cs-bg: rgba(34,197,94,.08);    --cs-bd: #22c55e;  --cs-t: #86efac;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--t1);
  background: var(--bg);
}
a { color: var(--ac); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin-bottom: 10px; }
strong { font-weight: 600; }

/* ── HEADER ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--hh);
  background: var(--hdr-bg);
  border-bottom: 1px solid var(--hdr-bd);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  gap: 12px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.header-brand:hover { text-decoration: none; }

.header-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--t1);
  line-height: 1.2;
}
.header-subtitle {
  font-size: 11px;
  color: var(--t3);
  line-height: 1.2;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── THEME TOGGLE ── */
.theme-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--bd);
  border-radius: var(--rad);
  color: var(--t2);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--bg-subtle); color: var(--t1); }
.theme-toggle .icon-sun  { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 6px;
  border: 1px solid var(--bd);
  border-radius: var(--rad);
  background: none;
}
.hamburger span {
  display: block;
  width: 16px; height: 2px;
  background: var(--t2);
  border-radius: 1px;
  transition: .2s;
}

/* ── LAYOUT ── */
.layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--hh);
}

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  top: var(--hh);
  left: 0;
  bottom: 0;
  width: var(--sw);
  background: var(--sb-bg);
  border-right: 1px solid var(--sb-bd);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 90;
  scrollbar-width: thin;
  scrollbar-color: var(--bd) transparent;
  padding-bottom: 48px;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: 2px; }
.sidebar-inner { padding: 16px 0; }

.sidebar-section { margin-top: 4px; }
.sidebar-section-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--sb-sec);
  padding: 16px 16px 4px;
  display: block;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 16px;
  color: var(--sb-t);
  font-size: 13px;
  font-weight: 400;
  transition: background .1s, color .1s;
  text-decoration: none;
  border-left: 2px solid transparent;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-link:hover {
  background: var(--sb-hover);
  color: var(--t1);
  text-decoration: none;
}
.sidebar-link.active {
  background: var(--sb-act-bg);
  color: var(--sb-act-t);
  border-left-color: var(--sb-act-bar);
  font-weight: 500;
}

.method-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: .75;
}
.dot-get  { background: var(--m-get-t); }
.dot-post { background: var(--m-post-t); }
.dot-put  { background: var(--m-put-t); }
.dot-del  { background: var(--m-del-t); }

/* ── CONTENT ── */
.content {
  flex: 1;
  margin-left: var(--sw);
  min-width: 0;
}
.content-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 36px 48px 72px;
}

/* ── BREADCRUMBS ── */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--t3);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--t2); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ac); }
.breadcrumbs .sep { color: var(--bd2); }
.breadcrumbs .current { color: var(--t1); font-weight: 500; }

/* ── PAGE HEADER ── */
.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--t1);
  line-height: 1.25;
  margin-bottom: 10px;
  letter-spacing: -.3px;
}
.page-desc {
  font-size: 15px;
  color: var(--t2);
  margin-bottom: 28px;
  line-height: 1.7;
  max-width: 640px;
}
.page-divider {
  border: none;
  border-top: 1px solid var(--bd);
  margin: 36px 0;
}

/* ── SECTION HEADING ── */
.api-section { margin-bottom: 52px; scroll-margin-top: calc(var(--hh) + 16px); }
.section-heading {
  font-size: 17px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 6px;
  letter-spacing: -.1px;
}
.section-heading a { color: inherit; text-decoration: none; }
.section-heading a:hover { color: var(--ac); }
.section-desc { color: var(--t2); margin-bottom: 14px; font-size: 14px; line-height: 1.65; }

/* ── ENDPOINT BAR ── */
.endpoint-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-endpoint);
  border: 1px solid var(--bd);
  border-radius: var(--rad);
  padding: 9px 14px;
  margin: 12px 0;
  font-family: "JetBrains Mono","Fira Code","Cascadia Code",ui-monospace,monospace;
  font-size: 12.5px;
  overflow-x: auto;
}
.method {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: .5px;
  flex-shrink: 0;
  font-family: inherit;
  white-space: nowrap;
}
.method-get  { background: var(--m-get-bg);  color: var(--m-get-t); }
.method-post { background: var(--m-post-bg); color: var(--m-post-t); }
.method-put  { background: var(--m-put-bg);  color: var(--m-put-t); }
.method-del  { background: var(--m-del-bg);  color: var(--m-del-t); }
.endpoint-url { color: var(--t1); }

/* ── AUTH BADGE ── */
.auth-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 14px;
  font-family: "JetBrains Mono","Fira Code",ui-monospace,monospace;
  letter-spacing: .2px;
}
.auth-required { background: var(--b-req-bg); color: var(--b-req-t); }
.auth-public   { background: var(--b-opt-bg); color: var(--b-opt-t); }

/* ── FIELD LABEL ── */
.field-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--t3);
  margin: 20px 0 6px;
}

/* ── TABLES ── */
.table-wrap {
  overflow-x: auto;
  margin: 6px 0 18px;
  border: 1px solid var(--bd);
  border-radius: var(--rad);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead tr { background: var(--bg-subtle); }
thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--t2);
  border-bottom: 1px solid var(--bd);
  white-space: nowrap;
}
tbody td {
  padding: 11px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--bd);
  color: var(--t1);
  line-height: 1.6;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-subtle); }
td:first-child {
  font-family: "JetBrains Mono","Fira Code",ui-monospace,monospace;
  font-size: 12px;
  color: var(--ac);
  font-weight: 500;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  font-family: "JetBrains Mono","Fira Code",ui-monospace,monospace;
}
.badge-req  { background: var(--b-req-bg);  color: var(--b-req-t); }
.badge-opt  { background: var(--b-opt-bg);  color: var(--b-opt-t); }
.badge-cond { background: var(--b-cond-bg); color: var(--b-cond-t); }

/* ── CODE BLOCKS ── */
.code-block {
  position: relative;
  background: var(--bg-code);
  border-radius: var(--rad);
  margin: 10px 0 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.05);
}
.code-block pre {
  padding: 16px 18px;
  overflow-x: auto;
  font-family: "JetBrains Mono","Fira Code","Cascadia Code",ui-monospace,monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: #cdd6f4;
  margin: 0;
}
.code-copy {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: #7f849c;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: .15s;
  font-family: -apple-system, sans-serif;
}
.code-copy:hover { background: rgba(255,255,255,.1); color: #cdd6f4; }
.code-copy.copied { color: #a6e3a1; border-color: rgba(166,227,161,.4); }

/* Syntax tokens */
/* .t-key     { color: #fbbf24; }
.t-str     { color: #fde68a; }
.t-num     { color: #fb923c; }
.t-bool    { color: #f87171; }
.t-comment { color: #52525b; font-style: italic; }
.t-punct   { color: #d1d5db; } */

:root {
  --hd-yellow: #fbbf24;
  --hd-yellow-light: #fde68a;
  --hd-black: #111827;
  --hd-gray: #6b7280;
  --hd-white: #f9fafb;
}

/* JSON Syntax Highlighting */
.t-key     { color: var(--hd-yellow); font-weight: 600; }
.t-str     { color: var(--hd-white); }
.t-num     { color: #f59e0b; }
.t-bool    { color: #eab308; }
.t-comment { color: var(--hd-gray); font-style: italic; }
.t-punct   { color: #d1d5db; }

/* ── INLINE CODE ── */
code {
  font-family: "JetBrains Mono","Fira Code",ui-monospace,monospace;
  font-size: 12px;
  /* background: var(--bg-subtle); */
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--t1);
  /* border: 1px solid var(--bd); */
}
.callout code {
  background: rgba(0,0,0,.06);
  border-color: rgba(0,0,0,.08);
  color: inherit;
}
[data-theme="dark"] .callout code {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.08);
}

/* ── CALLOUTS ── */
.callout {
  padding: 12px 16px;
  border-radius: var(--rad);
  margin: 14px 0;
  font-size: 13.5px;
  line-height: 1.65;
  border-left: 3px solid;
}
.callout-info    { background: var(--ci-bg); border-color: var(--ci-bd); color: var(--ci-t); }
.callout-warn    { background: var(--cw-bg); border-color: var(--cw-bd); color: var(--cw-t); }
.callout-danger  { background: var(--cd-bg); border-color: var(--cd-bd); color: var(--cd-t); }
.callout-success { background: var(--cs-bg); border-color: var(--cs-bd); color: var(--cs-t); }
.callout strong { font-weight: 600; }

/* ── FLOW STEPS ── */
.flow-list { list-style: none; margin: 16px 0; }
.flow-item {
  display: flex;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--rad);
  margin-bottom: 6px;
}
[data-theme="dark"] .flow-item { background: var(--bg-subtle); }
.flow-item.conditional { background: var(--cw-bg); border-color: var(--cw-bd); }
.flow-item.payment-step { background: var(--cs-bg); border-color: var(--cs-bd); }

.flow-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--t2);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.flow-item.conditional .flow-num { background: var(--cw-bd); }
.flow-item.payment-step .flow-num { background: var(--cs-bd); color: #fff; }
[data-theme="dark"] .flow-num { color: var(--bg-code); }

.flow-body { flex: 1; min-width: 0; }
.flow-title { font-weight: 600; font-size: 13.5px; color: var(--t1); }
.flow-desc  { font-size: 13px; color: var(--t2); margin-top: 3px; line-height: 1.6; }

/* ── TRACEABILITY TABLE ── */
.trace-table td:nth-child(2) {
  font-family: "JetBrains Mono","Fira Code",ui-monospace,monospace;
  font-size: 11.5px;
  color: var(--t2);
}

/* ── PAGE NAVIGATION ── */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  border-top: 1px solid var(--bd);
  margin-top: 56px;
  padding-top: 20px;
  gap: 12px;
}
.page-nav a {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--rad);
  text-decoration: none;
  color: var(--t1);
  transition: border-color .15s;
  min-width: 140px;
  max-width: 240px;
}
.page-nav a:hover { border-color: var(--ac); text-decoration: none; }
.nav-label { font-size: 11px; color: var(--t3); font-weight: 500; margin-bottom: 2px; }
.nav-title { font-size: 13px; font-weight: 600; color: var(--ac); }
.nav-next  { text-align: right; margin-left: auto; }

/* ── CARD GRID ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.card {
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--rad);
  padding: 16px;
  text-decoration: none;
  color: var(--t1);
  transition: border-color .15s;
  display: block;
}
.card:hover { border-color: var(--ac); text-decoration: none; }
.card-icon  { display: none; }
.card-name  { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; color: var(--t1); }
.card-desc  { font-size: 12.5px; color: var(--t2); line-height: 1.55; }

/* ── OVERLAY ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 89;
  backdrop-filter: blur(2px);
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .content { margin-left: 0; }
  .content-inner { padding: 24px 20px 56px; }
  .page-nav { flex-direction: column; align-items: stretch; }
  .page-nav a { max-width: 100%; min-width: 0; }
  .page-nav .nav-next { margin-left: 0; }
}
@media (max-width: 480px) {
  .page-title { font-size: 20px; }
  .card-grid  { grid-template-columns: 1fr 1fr; }
  .content-inner { padding: 18px 14px 48px; }
}

/* ── UTILITIES ── */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
