/* ===== API & CLI REFERENCE SHARED STYLES ===== */

/* ===== ENDPOINT / COMMAND CARDS ===== */
.endpoint-card,
.cmd-card {
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  border-radius: 14px;
  padding: 36px 30px;
  margin-bottom: 28px;
}

.endpoint-header,
.cmd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* ===== METHOD BADGES ===== */
.method-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 6px;
  flex-shrink: 0;
}

.method-badge.post {
  background: var(--forest);
  color: var(--cream);
}

.method-badge.get {
  background: var(--amber);
  color: var(--bark);
}

/* ===== AUTH / PUBLIC PILLS ===== */
.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.auth-pill.authenticated {
  background: rgba(45, 74, 45, 0.08);
  color: var(--forest);
  border: 1px solid rgba(45, 74, 45, 0.15);
}

.auth-pill.public {
  background: rgba(200, 148, 62, 0.08);
  color: var(--amber);
  border: 1px solid rgba(200, 148, 62, 0.15);
}

.auth-pill .pill-icon {
  width: 10px;
  height: 10px;
}

/* ===== ENDPOINT / COMMAND PATH ===== */
.endpoint-path,
.cmd-name {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--bark);
}

.endpoint-desc,
.cmd-desc {
  font-size: 0.92rem;
  color: var(--bark-light);
  line-height: 1.65;
  font-weight: 300;
  margin-bottom: 20px;
}

.endpoint-desc a,
.cmd-desc a {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== LANGUAGE TABS ===== */
.lang-tabs {
  display: flex;
  gap: 4px;
  background: var(--cream-dark);
  border-radius: 8px;
  padding: 3px;
  width: fit-content;
  margin-bottom: 0;
}

.lang-tab {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 7px 16px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--bark-light);
  cursor: pointer;
  transition: all 0.2s;
}

.lang-tab.active {
  background: var(--forest);
  color: var(--cream);
}

.lang-tab:hover:not(.active) {
  background: rgba(45, 74, 45, 0.06);
}

.lang-panel {
  display: none;
}

.lang-panel.active {
  display: block;
}

/* ===== API LABELS ===== */
.api-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bark-light);
  margin: 24px 0 10px;
}

.api-label:first-of-type {
  margin-top: 0;
}

/* ===== ALTERNATING SECTION BACKGROUNDS ===== */
.api-section-alt {
  background: var(--white);
  border-top: 1px solid var(--cream-dark);
  border-bottom: 1px solid var(--cream-dark);
}

/* ===== PARAM / FLAG TABLES ===== */
.param-table,
.flag-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 12px 0;
}

.param-table thead th,
.flag-table thead th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bark-light);
  padding: 8px 14px;
  text-align: left;
  border-bottom: 2px solid var(--cream-dark);
}

.param-table tbody td,
.flag-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--cream-dark);
  line-height: 1.5;
  color: var(--bark-light);
  font-weight: 300;
  vertical-align: top;
}

.param-table tbody td:first-child,
.flag-table tbody td:first-child {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--bark);
  white-space: nowrap;
}

.param-table tbody td:nth-child(2),
.flag-table tbody td:nth-child(2) {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--moss);
}

.flag-table tbody td:nth-child(3) {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--sage);
}

/* ===== EVENT TABLE ===== */
.event-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 12px 0;
}

.event-table thead th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bark-light);
  padding: 8px 14px;
  text-align: left;
  border-bottom: 2px solid var(--cream-dark);
}

.event-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--cream-dark);
  line-height: 1.5;
  color: var(--bark-light);
  font-weight: 300;
  vertical-align: top;
}

.event-table tbody td:first-child {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--bark);
  white-space: nowrap;
}

/* ===== ERROR TABLE ===== */
.error-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 12px 0;
}

.error-table thead th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bark-light);
  padding: 8px 14px;
  text-align: left;
  border-bottom: 2px solid var(--cream-dark);
}

.error-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--cream-dark);
  line-height: 1.5;
  color: var(--bark-light);
  font-weight: 300;
  vertical-align: top;
}

.error-table tbody td:first-child {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--bark);
  white-space: nowrap;
}

/* ===== RATE LIMIT CARDS ===== */
.limit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
}

.limit-card {
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
}

.limit-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--forest);
  line-height: 1;
  margin-bottom: 6px;
}

.limit-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bark-light);
}

.limit-note {
  font-size: 0.78rem;
  color: var(--moss);
  margin-top: 6px;
  font-weight: 300;
}

/* ===== INLINE CODE IN DOCS ===== */
.endpoint-card code,
.cmd-card code,
.endpoint-desc code,
.cmd-desc code,
.api-section-alt code {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  background: var(--cream-dark);
  padding: 2px 7px;
  border-radius: 4px;
}

.endpoint-card .code-block code,
.cmd-card .code-block code {
  background: transparent;
  padding: 0;
}

/* ===== RESPONSE HEADER BADGE ===== */
.response-header {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--sage);
  margin-bottom: 4px;
}

/* ===== CONFIG SECTION ===== */
.config-group {
  margin-bottom: 28px;
}

.config-group-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--bark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--cream-dark);
}

/* ===== SSE STREAM EXAMPLE ===== */
.stream-example {
  background: var(--bark);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
  margin: 12px 0;
}

.stream-example pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--cream);
  margin: 0;
}

.stream-example .sse-event {
  color: var(--sage-light);
}

.stream-example .sse-data {
  color: var(--amber-light);
}

/* ===== FILE LOCATION LIST ===== */
.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.file-list li {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--cream-dark);
  font-size: 0.9rem;
}

.file-list li:last-child {
  border-bottom: none;
}

.file-path {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--bark);
  font-weight: 400;
  white-space: nowrap;
}

.file-desc {
  color: var(--bark-light);
  font-weight: 300;
}

/* ===== ENV VAR TABLE ===== */
.env-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 12px 0;
}

.env-table thead th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bark-light);
  padding: 8px 14px;
  text-align: left;
  border-bottom: 2px solid var(--cream-dark);
}

.env-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--cream-dark);
  line-height: 1.5;
  color: var(--bark-light);
  font-weight: 300;
  vertical-align: top;
}

.env-table tbody td:first-child {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--bark);
  white-space: nowrap;
}

/* ===== DOCS SECTION SPACING ===== */
.docs-section {
  padding: 80px 0;
}

.docs-section .section-header {
  margin-bottom: 32px;
}
