/* ============================================================
   WAGate.app — Developer pages (/developers/*)
   Builds on styles.css tokens + the legal.css reading system
   (.lg-* classes); adds a Docs / API tab bar, code blocks,
   and endpoint rows. LTR only (developer documentation).
   ============================================================ */

/* ---- Top bar (wider than legal, holds the tab bar) ---- */
.dev-nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.dev-logo-img { display: block; height: 28px; width: auto; }

.dev-tabs { display: inline-flex; gap: 4px; }
.dev-tab {
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.dev-tab:hover { background: var(--surface-2); color: var(--text); }
.dev-tab.on { background: var(--accent-tint); color: var(--accent-text); }

/* Developer docs are English-only — keep the reading column LTR even when the
   shared chrome is in an RTL language (he/ar). */
.dev-container { max-width: 820px; direction: ltr; text-align: left; }

/* Docs / API tab bar now lives as a sub-nav at the top of the content. */
.dev-subnav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 26px;
}

/* ---- Inline code ---- */
.dev-doc code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 1px 6px;
  white-space: nowrap;
}

/* ---- Code blocks ---- */
.dev-code {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.65;
  background: #0f1115;
  color: #e6e9ef;
  border: 1px solid #1c1f27;
  border-radius: var(--r-lg);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 6px 0 22px;
}
.dev-code code {
  background: none;
  border: 0;
  padding: 0;
  white-space: pre;
  font-size: inherit;
  color: inherit;
}
.dev-code .c { color: #7d8694; } /* comment */
.dev-code .s { color: #c3e88d; } /* string  */
.dev-code .p { color: #82aaff; } /* property / key */

/* ---- Endpoint row ---- */
.dev-ep {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 11px 14px;
  margin: 8px 0 14px;
  box-shadow: var(--sh-xs);
  overflow-x: auto;
}
.dev-method {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: var(--r-xs);
  flex-shrink: 0;
}
.dev-method.post { background: var(--accent-tint); color: var(--accent-text); }
.dev-method.get { background: var(--blue-tint); color: var(--blue-text); }

/* ---- Small "preview" pill next to the kicker ---- */
.dev-tag {
  display: inline-block;
  margin-inline-start: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--amber-tint);
  color: var(--amber-text);
  vertical-align: middle;
}

@media (max-width: 560px) {
  .dev-tabs { gap: 0; }
  .dev-tab { padding: 7px 10px; font-size: 13px; }
  .lg-home { display: none; }
  /* Inline code wraps on small screens instead of forcing horizontal scroll. */
  .dev-doc code { white-space: normal; word-break: break-word; }
  .dev-doc { overflow-wrap: break-word; }
}
