/* ============================================================
   Stella Santral — API dokümantasyonu (koyu tema)
   ============================================================ */
.api-docs-page { padding-bottom: 60px; }

/* Üst bilgi bandı */
.api-docs-hero {
  padding: 46px 0 26px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(70% 120% at 12% 0%, rgba(99,102,241,.14), transparent 62%);
}
.api-docs-hero h1 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -1px; margin: 8px 0 10px; }
.api-docs-hero p { color: var(--muted); max-width: 720px; margin: 0; font-size: 14.5px; }
.api-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.api-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 10px;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  font-size: 12.5px; font-weight: 700; text-decoration: none; transition: .15s;
}
.api-pill:hover { border-color: rgba(129,140,248,.5); background: rgba(99,102,241,.12); color: #fff; }
.api-pill.primary { background: linear-gradient(100deg,#4f46e5,#7c6cf6); border-color: transparent; color: #fff; }
.api-pill.primary:hover { filter: brightness(1.08); }
.api-pill svg { width: 15px; height: 15px; }

/* Anahtar çubuğu */
.api-docs-keybar {
  position: sticky; top: var(--header-h, 68px); z-index: 70;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border); padding: 10px 0;
}
.api-docs-keybar .kb-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.api-docs-keybar label { font-size: 11.5px; font-weight: 700; color: var(--muted); margin: 0; white-space: nowrap; }
.api-docs-keybar input {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
  background: var(--surface); border: 1px solid var(--border-2); color: var(--text);
  border-radius: 8px; padding: 7px 10px; min-width: 260px;
}
.api-docs-keybar input:focus { outline: none; border-color: rgba(129,140,248,.6); }
.api-docs-keybar .kb-note { font-size: 11px; color: var(--muted-2); }

/* İçerik */
.api-docs-body { padding-top: 34px; color: var(--text); }
.api-docs-body .section-title { font-size: 20px; font-weight: 800; letter-spacing: -.4px; margin-bottom: 8px; }
.api-docs-body p, .api-docs-body li { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.api-docs-body code {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
  background: rgba(129,140,248,.13); color: #c7d2fe; padding: 1px 5px; border-radius: 4px;
}
pre.code {
  background: #080d1a; color: #dfe7f5; border: 1px solid var(--border);
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; line-height: 1.6;
  padding: 12px 14px; border-radius: 10px; overflow-x: auto; margin: 0;
}

/* Uç nokta tablosu */
.ep-table {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 22px;
}
.ep-cat td {
  background: rgba(99,102,241,.10); font-weight: 800; font-size: 11px; text-transform: uppercase;
  letter-spacing: .05em; color: #a5b4fc; padding: 8px 14px; border-top: 1px solid var(--border);
}
.ep-row { border-top: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.ep-row:hover { background: rgba(255,255,255,.035); }
.ep-row td { padding: 9px 14px; vertical-align: middle; }
.ep-row .path { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; white-space: nowrap; color: #dbe4ff; }
.ep-row .desc { color: var(--muted); font-size: 11.5px; width: 100%; }
.ep-row .chev { color: var(--muted-2); font-size: 10px; float: right; }
.ep-detail td { padding: 0; background: rgba(255,255,255,.02); border-top: none; }
.ep-detail:not(.show) { display: none; }

/* Metot rozetleri */
.m { display: inline-block; font-family: ui-monospace, monospace; font-weight: 700; font-size: 9.5px; padding: 3px 7px; border-radius: 5px; margin-right: 3px; min-width: 40px; text-align: center; }
.m-get { background: rgba(56,189,248,.16); color: #7dd3fc; }
.m-post { background: rgba(52,211,153,.16); color: #6ee7b7; }
.m-put { background: rgba(167,139,250,.18); color: #c4b5fd; }
.m-delete { background: rgba(248,113,113,.16); color: #fca5a5; }

/* Detay paneli */
.ep-panel { padding: 14px 16px 16px; }
.ep-tabs, .lang-tabs { display: flex; gap: 5px; margin-bottom: 10px; flex-wrap: wrap; }
.ep-tab, .lang-tab {
  border: 1px solid var(--border-2); background: transparent; color: var(--muted);
  font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 7px; cursor: pointer; transition: .12s;
}
.ep-tab:hover, .lang-tab:hover { color: var(--text); border-color: rgba(129,140,248,.45); }
.ep-tab.active { background: linear-gradient(100deg,#4f46e5,#7c6cf6); color: #fff; border-color: transparent; }
.lang-tab.active { background: rgba(99,102,241,.18); color: #c7d2fe; border-color: rgba(129,140,248,.5); }
.ep-pane, .lang-pane { display: none; }
.ep-pane.active, .lang-pane.active { display: block; }
.lang-pane { position: relative; }

.fields-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.fields-table td { padding: 5px 10px 5px 0; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--muted); }
.fields-table td:first-child { width: 34%; white-space: nowrap; color: #c7d2fe; font-family: ui-monospace, monospace; font-size: 11px; }

.ep-params { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.ep-params .pfield { display: flex; flex-direction: column; gap: 3px; }
.ep-params label { font-size: 10.5px; font-weight: 700; color: var(--muted-2); }
.ep-params input {
  font-family: ui-monospace, monospace; font-size: 11.5px; padding: 5px 8px; width: 160px;
  background: var(--bg); border: 1px solid var(--border-2); border-radius: 7px; color: var(--text);
}
.ep-body-edit {
  width: 100%; font-family: ui-monospace, monospace; font-size: 11.5px; min-height: 96px; padding: 9px;
  background: #080d1a; border: 1px solid var(--border-2); border-radius: 8px; color: #dfe7f5;
}
.ep-send {
  background: linear-gradient(100deg,#4f46e5,#7c6cf6); color: #fff; border: none;
  font-size: 11.5px; font-weight: 700; padding: 7px 16px; border-radius: 8px; cursor: pointer;
}
.ep-send:hover { filter: brightness(1.08); }
.ep-resp {
  background: #080d1a; color: #6ee7b7; border: 1px solid var(--border);
  font-family: ui-monospace, monospace; font-size: 11.5px; padding: 11px 13px; border-radius: 8px;
  min-height: 40px; white-space: pre-wrap; overflow-x: auto; margin-top: 9px;
}
.copy-btn {
  position: absolute; top: 7px; right: 7px; background: rgba(99,102,241,.9); color: #fff;
  border: none; font-size: 10px; font-weight: 700; padding: 4px 9px; border-radius: 5px; cursor: pointer;
}
.copy-btn:hover { background: #6366f1; }

/* Açık tema */
html[data-theme="light"] .api-docs-keybar input,
html[data-theme="light"] .ep-params input { background: #fff; border-color: #d9e2f1; color: #0f172a; }
html[data-theme="light"] .ep-table { background: #fff; }
html[data-theme="light"] .ep-cat td { background: #eef2ff; color: #4338ca; }
html[data-theme="light"] .ep-row .path { color: #1e293b; }
html[data-theme="light"] .ep-row:hover { background: #f8fafc; }
html[data-theme="light"] .api-pill { background: #fff; border-color: #d9e2f1; color: #0f172a; }

@media (max-width: 767px) {
  .api-docs-keybar { position: static; }
  .api-docs-keybar input { min-width: 0; width: 100%; }
  .api-docs-keybar .kb-row { gap: 6px; }
  .ep-row .path { white-space: normal; word-break: break-all; }
}

/* İçerik kartı + bootstrap form düzeltmeleri */
.api-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 28px; }
.api-muted { color: var(--muted) !important; }
.api-docs-body .form-control {
  background: var(--bg); border: 1px solid var(--border-2); color: var(--text);
  font-size: 12px; border-radius: 8px;
}
.api-docs-body .form-control::placeholder { color: var(--muted-2); }
.api-docs-body strong { color: var(--text); }
.api-docs-body a { color: #a5b4fc; }
.api-docs-body a:hover { color: #c7d2fe; }
html[data-theme="light"] .api-card { background: #fff; }
html[data-theme="light"] .api-docs-body .form-control { background: #fff; border-color: #d9e2f1; color: #0f172a; }

/* RTL: dokümantasyon içeriği LTR dilde (TR/EN) yazıldığı için sola hizala */
[dir="rtl"] .api-docs-body,
[dir="rtl"] .api-docs-keybar { direction: ltr; text-align: left; }
[dir="rtl"] pre.code,
[dir="rtl"] .ep-resp,
[dir="rtl"] .ep-body-edit,
[dir="rtl"] .ep-row .path,
[dir="rtl"] .fields-table td:first-child,
[dir="rtl"] .api-docs-body code,
[dir="rtl"] .api-docs-keybar input {
  direction: ltr; unicode-bidi: embed; text-align: left;
}

/* İki dilli açıklamalar: üstte İngilizce, altta Türkçe */
.ep-en { display: block; color: var(--text); font-size: 12.5px; line-height: 1.45; }
.ep-tr { display: block; color: var(--muted-2); font-size: 11px; margin-top: 2px; line-height: 1.4; }
.ep-row .desc { padding-right: 26px; }
.ep-row .chev { width: 14px; height: 14px; float: right; margin-right: -18px; color: var(--muted-2); transition: transform .18s; }
.ep-cat .cat-en { margin-right: 7px; }
.ep-cat .cat-tr { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 10.5px; color: var(--muted-2); }
.fld-tr { display: block; color: var(--muted-2); font-size: 10.5px; margin-top: 2px; line-height: 1.4; }

/* Bölüm başlığı TR karşılığı + Türkçe açıklama satırları */
.sec-tr {
  font-size: 12px; font-weight: 600; color: var(--muted-2); letter-spacing: 0;
  margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--border-2);
}
.tr-note {
  font-size: 11.5px; line-height: 1.6; color: var(--muted-2);
  border-left: 2px solid var(--border-2); padding-left: 10px; margin-top: 4px;
}
.tr-note code { font-size: 10.5px; }
