/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand palette */
  --neutral-blue:  #222C59;
  --navy-blue:     #273146;
  --light-bg:      #FBFCFE;
  --neon:          #DCFA6B;

  --bg:            #FBFCFE;
  --surface:       #ffffff;
  --surface-2:     #f0f2f8;
  --border:        #dde1ef;
  --text:          #222C59;
  --text-muted:    #5a6080;
  --accent:        #222C59;
  --accent-light:  #eef0f8;
  --accent-neon:   #DCFA6B;
  --radius:        8px;
  --radius-sm:     5px;
  --shadow:        0 1px 3px rgba(34,44,89,.08), 0 1px 2px rgba(34,44,89,.04);
  --shadow-md:     0 4px 12px rgba(34,44,89,.12);
  --font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  --font-mono:     'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Monaco, Consolas, monospace;
  /* HTTP method colors */
  --get:           #16a34a;
  --get-bg:        #f0fdf4;
  --post:          #2563eb;
  --post-bg:       #eff6ff;
  --put:           #d97706;
  --put-bg:        #fffbeb;
  --patch:         #9333ea;
  --patch-bg:      #faf5ff;
  --delete:        #dc2626;
  --delete-bg:     #fef2f2;
}

html { font-size: 15px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding: 0;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
  font-family: var(--font-mono);
  font-size: .85em;
}

/* ─── Layout ────────────────────────────────────────────────── */
.container-fluid { max-width: 1050px; margin: 0 auto; padding: 0 1.5rem 3rem; }
.row-fluid { display: block; }
#container { padding-top: 1.5rem; }

/* ─── Breadcrumb ────────────────────────────────────────────── */
ul.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  list-style: none;
  background: var(--neutral-blue);
  border: none;
  border-radius: var(--radius);
  padding: .6rem 1rem;
  margin-bottom: 1.75rem;
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  box-shadow: var(--shadow);
}

ul.breadcrumb li::after { content: '/'; margin-left: .35rem; color: rgba(255,255,255,.25); }
ul.breadcrumb li:last-child::after { content: ''; }
ul.breadcrumb li a { color: rgba(255,255,255,.85); }
ul.breadcrumb li.active a { color: #ffffff; font-weight: 600; }
ul.breadcrumb li.pull-right { margin-left: auto; }
ul.breadcrumb li.pull-right::after { content: ''; }
.divider { color: rgba(255,255,255,.25); margin: 0 .15rem; }

/* ─── Page header / Section titles ─────────────────────────── */
h1.page-header {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--neutral-blue);
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--neon);
  margin-bottom: 1.5rem;
}

h1.page-header small { font-size: 1rem; font-weight: 400; color: var(--text-muted); margin-left: .5rem; }

h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 .5rem;
}

h2 small { font-size: .85rem; font-weight: 400; color: var(--text-muted); display: block; margin-top: .2rem; }

h3 { font-size: 1rem; font-weight: 600; margin: 1.25rem 0 .5rem; }
h4 { font-size: .9rem; font-weight: 600; margin: 1rem 0 .4rem; }

/* ─── Resource index main title ─────────────────────────────── */
div > h1.page-header { margin-top: 0; }

/* ─── Resource block (index page) ──────────────────────────── */
h2 > a {
  color: var(--accent);
  font-size: 1.1rem;
}

/* ─── Tables ────────────────────────────────────────────────── */
table.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: .9rem;
}

table.table thead tr {
  background: var(--surface-2);
}

table.table th {
  text-align: left;
  padding: .65rem 1rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

table.table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}

table.table tbody tr:last-child td { border-bottom: none; }

table.table tbody tr:hover { background: var(--surface-2); }

table.table td a {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

table.table td:first-child {
  width: 55%;
  min-width: 320px;
}

table.table td a:hover { color: var(--accent); text-decoration: none; }

/* ─── HTTP Method badges inline in table links ──────────────── */
table.table td a::before {
  content: '';
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .15rem .4rem;
  border-radius: 4px;
  white-space: nowrap;
}

/* detect method from the link text using attribute selectors */
table.table td a[href*="index"]::before,
table.table td a[href*="show"]::before   { content: ''; } /* no badge on nav links */

/* ─── Method detail page: big HTTP method in h1 ─────────────── */
.page-header h1 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: 1.4rem;
  line-height: 1.3;
}

/* ─── Label / Badge (for error codes) ───────────────────────── */
.label {
  display: inline-block;
  padding: .2rem .5rem;
  font-size: .75rem;
  font-weight: 600;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-muted);
  letter-spacing: .03em;
}

.label-success  { background: #dcfce7; color: #166534; }
.label-info     { background: #e0f2fe; color: #075985; }
.label-info2    { background: #ede9fe; color: #5b21b6; }
.label-warning  { background: #fef9c3; color: #854d0e; }
.label-warning2 { background: #ffedd5; color: #9a3412; }
.label-important{ background: #fee2e2; color: #991b1b; }
.label-inverse  { background: #1e293b; color: #e2e8f0; }
/* 500 override: label with no extra class → red */
span.label:not([class*="label-"]) { background: #fee2e2; color: #991b1b; }

/* ─── DEPRECATED badge ──────────────────────────────────────── */
code {
  background: transparent;
  color: inherit;
  padding: .15rem .4rem;
  border-radius: 4px;
  font-size: .8rem;
  font-weight: 600;
}

/* ─── Code / Examples ───────────────────────────────────────── */
pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: .82rem;
  line-height: 1.6;
  margin: .75rem 0 1.25rem;
  border: 1px solid #313244;
}

pre.prettyprint { border: none; }

/* prettify overrides */
.com { color: #6c7086; }
.lit { color: #fab387; }
.pun, .opn, .clo { color: #cdd6f4; }
.fun { color: #89b4fa; }
.str, .atv { color: #a6e3a1; }
.kwd, .tag { color: #cba6f7; }
.typ { color: #89dceb; }
.atn { color: #f38ba8; }
.dec { color: #fab387; }

/* ─── Method detail sections ─────────────────────────────────── */
hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* ─── Footer ─────────────────────────────────────────────────── */
footer {
  margin-top: 3rem;
  padding: 1rem 0;
  text-align: center;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ─── Getting Started / Info block ──────────────────────────── */
div > p { margin-bottom: .75rem; color: var(--text-muted); font-size: .95rem; }

/* ─── Resource description text ─────────────────────────────── */
small { color: var(--text-muted); }

/* ─── Misc utils ─────────────────────────────────────────────── */
.pull-right { float: right; }

/* ─── Header ─────────────────────────────────────────────────── */
.api-header {
  background: var(--navy-blue);
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(34,44,89,.18);
  margin-bottom: 2rem;
}

.api-header-inner {
  max-width: 1050px;
  margin: 0 auto;
  padding: .85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.api-header-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}

.api-header-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--neon);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-blue);
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: -.02em;
  flex-shrink: 0;
}

.api-header-title {
  font-size: .95rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}

.api-header-subtitle {
  font-size: .72rem;
  color: rgba(255,255,255,.55);
  font-weight: 400;
}

.api-header-badge {
  margin-left: auto;
  background: rgba(220,250,107,.15);
  color: var(--neon);
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .65rem;
  border-radius: 999px;
  border: 1px solid rgba(220,250,107,.35);
  font-family: var(--font-mono);
  letter-spacing: .04em;
}
