/* Docs code panels — shamcash-api inspired syntax colors (docs page only) */

.docs-page .code-panel {
  margin: 0.65rem 0 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: #0b1120;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.docs-page .code-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: #111827;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.docs-page .code-panel-lang {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.docs-page .code-panel-copy {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
  font: inherit;
  font-size: 0.74rem;
  padding: 0.28rem 0.65rem;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.docs-page .code-panel-copy:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.35);
  color: #f1f5f9;
}

.docs-page .code-panel-body {
  margin: 0 !important;
  padding: 1rem 1.05rem !important;
  background: #0b1120 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow-x: visible;
  direction: ltr;
  text-align: left;
  font-size: 0.82rem;
  line-height: 1.62;
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.docs-page .code-panel-body code {
  font-family: ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  background: transparent !important;
  padding: 0 !important;
  color: #e2e8f0;
  font-size: inherit;
  display: block;
}

/* Syntax tokens — shamcash-like palette */
.docs-page .code-panel-body .token.comment,
.docs-page .code-panel-body .token.prolog,
.docs-page .code-panel-body .token.doctype,
.docs-page .code-panel-body .token.cdata {
  color: #64748b;
}

.docs-page .code-panel-body .token.punctuation {
  color: #94a3b8;
}

.docs-page .code-panel-body .token.property,
.docs-page .code-panel-body .token.tag,
.docs-page .code-panel-body .token.boolean,
.docs-page .code-panel-body .token.number,
.docs-page .code-panel-body .token.constant,
.docs-page .code-panel-body .token.symbol,
.docs-page .code-panel-body .token.deleted {
  color: #f472b6;
}

.docs-page .code-panel-body .token.selector,
.docs-page .code-panel-body .token.attr-name,
.docs-page .code-panel-body .token.string,
.docs-page .code-panel-body .token.char,
.docs-page .code-panel-body .token.builtin,
.docs-page .code-panel-body .token.inserted {
  color: #9586ef;
}

.docs-page .code-panel-body .token.operator,
.docs-page .code-panel-body .token.entity,
.docs-page .code-panel-body .token.url,
.docs-page .code-panel-body .language-css .token.string,
.docs-page .code-panel-body .style .token.string {
  color: #67e8f9;
}

.docs-page .code-panel-body .token.atrule,
.docs-page .code-panel-body .token.attr-value,
.docs-page .code-panel-body .token.keyword {
  color: #93c5fd;
}

.docs-page .code-panel-body .token.function,
.docs-page .code-panel-body .token.class-name {
  color: #fde047;
}

.docs-page .code-panel-body .token.regex,
.docs-page .code-panel-body .token.important,
.docs-page .code-panel-body .token.variable {
  color: #fdba74;
}

.docs-page .docs-auth-block {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0.65rem 0 1rem;
}

.docs-page .docs-auth-block > strong {
  display: none;
}

.docs-page .docs-auth-block .code-panel {
  margin: 0;
}

@media (max-width: 640px) {
  .docs-page .code-panel-body {
    font-size: 0.72rem;
    padding: 0.75rem 0.8rem !important;
  }
}

/* —— Docs layout polish (2026-11-09) —— */

/* المقدمة تحت العنوان الرئيسي */
.docs-page .docs-lead {
  font-size: 1.02rem;
  line-height: 1.85;
  color: #a3aebd;
  max-width: 46rem;
}

/* عناوين المجموعات (عام · Sham Cash · Syriatel Cash …) أكبر من عناوين الطلبات تحتها */
.docs-page .docs-content h2.docs-section-label {
  margin: 3.5rem 0 0.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(143, 125, 255, 0.18);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(143, 125, 255, 0.07), rgba(143, 125, 255, 0) 70%);
  color: #f1f5fb;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.docs-page .docs-content h2.docs-section-label + h2,
.docs-page .docs-content h2.docs-section-label + .docs-note + h2 {
  border-top: none;
  margin-top: 1.5rem;
  padding-top: 0;
}
.docs-page .docs-content h2.docs-section-label + .docs-note { margin-top: 1rem; }

/* عناوين الطلبات */
.docs-page .docs-content h2:not(.docs-section-label) {
  font-size: 1.22rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.docs-page .endpoint-tag { margin: 0; }

/* القائمة الجانبية: القسم الحالي */
.docs-page .docs-nav a.is-active {
  background: rgba(143, 125, 255, 0.09);
  color: #f1f5fb;
  box-shadow: inset -2px 0 0 #8f7dff;
}

/* قوائم المعاملات */
.docs-page ul.docs-hint {
  margin: 0.2rem 0 0.9rem;
  padding-right: 1.15rem;
  line-height: 1.95;
}
/* أسماء المعاملات القصيرة لا تنكسر في منتصفها (gsm ← g / sm) */
.docs-page .docs-content li code,
.docs-page .docs-content p code,
.docs-page .docs-note code {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

/* تبويبات اللغات */
.docs-page .docs-tabs {
  margin: 0.85rem 0 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background: #0b1120;
  overflow: hidden;
}
.docs-page .docs-tabs-bar {
  display: flex;
  gap: 0.25rem;
  padding: 0.45rem;
  background: #111827;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  direction: ltr;
  overflow-x: auto;
}
.docs-page .docs-tabs-bar button {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font: 600 0.82rem/1 var(--font-latin, "Manrope", sans-serif);
  padding: 0.55rem 0.9rem;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.docs-page .docs-tabs-bar button:hover { color: #e2e8f0; background: rgba(148, 163, 184, 0.08); }
.docs-page .docs-tabs-bar button[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(135deg, #a594ff, #6d5cf6);
}
.docs-page .docs-tabs-bar button:focus-visible { outline: 2px solid #8f7dff; outline-offset: 2px; }
.docs-page .docs-tab-panel .code-panel {
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* زر الواتساب: على الكمبيوتر ينتقل لجهة القائمة الجانبية حتى لا يغطي بداية الكود */
@media (min-width: 1025px) {
  .docs-body .contact-bubble { left: auto; right: 1.15rem; }
  .docs-body .docs-nav-side { padding-bottom: 4.5rem; }
}

@media (max-width: 640px) {
  .docs-page .docs-content h2.docs-section-label { font-size: 1.25rem; padding: 0.75rem 0.9rem; margin-top: 2.5rem; }
  .docs-page .docs-content h2:not(.docs-section-label) { font-size: 1.05rem; }
  .docs-page .docs-tabs-bar button { padding: 0.5rem 0.7rem; font-size: 0.78rem; }
}
