/* ringbeta Developer API documentation page styles */

.doc-page-body {
  background: #f8fafc;
  min-height: 100vh;
}

[data-bs-theme="dark"] .doc-page-body {
  background: #0f172a;
}

.doc-layout {
  display: flex;
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 16px 80px;
  gap: 32px;
  align-items: flex-start;
}

.doc-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}

[data-bs-theme="dark"] .doc-sidebar {
  background: #1a2232;
  border-color: #2e3c52;
}

.doc-search-box {
  margin-bottom: 16px;
}

.doc-nav-group {
  margin-bottom: 18px;
}

.doc-nav-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 6px;
  padding: 0 8px;
}

.doc-nav-link {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #334155;
  text-decoration: none;
}

[data-bs-theme="dark"] .doc-nav-link {
  color: #cbd5e1;
}

.doc-nav-link:hover {
  background: #eff6ff;
  color: #2563eb;
}

[data-bs-theme="dark"] .doc-nav-link:hover {
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
}

.doc-main {
  flex: 1;
  min-width: 0;
}

.doc-hero {
  background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
  border-radius: 16px;
  color: #ffffff;
  padding: 40px 36px;
  margin-bottom: 28px;
}

.doc-hero h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 8px;
}

.doc-hero p {
  opacity: 0.9;
  margin: 0 0 16px;
  max-width: 640px;
}

.doc-hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  margin-right: 10px;
}

.doc-hero-links a:hover {
  background: rgba(255, 255, 255, 0.25);
}

.doc-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 24px;
}

[data-bs-theme="dark"] .doc-section-card {
  background: #1a2232;
  border-color: #2e3c52;
  color: #e2e8f0;
}

.doc-section-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.doc-quickstart-step {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}

.doc-quickstart-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-error-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.doc-error-table th,
.doc-error-table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
}

[data-bs-theme="dark"] .doc-error-table th,
[data-bs-theme="dark"] .doc-error-table td {
  border-bottom-color: #2e3c52;
}

.doc-error-table code {
  font-weight: 700;
}

.doc-tag-section {
  margin-bottom: 8px;
}

.doc-tag-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

[data-bs-theme="dark"] .doc-tag-title {
  border-bottom-color: #2e3c52;
}

.doc-endpoint-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 18px;
}

[data-bs-theme="dark"] .doc-endpoint-card {
  background: #1a2232;
  border-color: #2e3c52;
}

.doc-endpoint-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.doc-method-badge {
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 6px;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.doc-method-get {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.doc-method-post {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
}

.doc-endpoint-path {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  color: #334155;
}

[data-bs-theme="dark"] .doc-endpoint-path {
  color: #e2e8f0;
}

.doc-danger-badge {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.doc-endpoint-summary {
  color: #475569;
  margin-bottom: 8px;
}

[data-bs-theme="dark"] .doc-endpoint-summary {
  color: #94a3b8;
}

.doc-idem-note {
  background: rgba(217, 119, 6, 0.08);
  border-left: 3px solid #d97706;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: #92400e;
  border-radius: 0 6px 6px 0;
  margin-bottom: 12px;
}

[data-bs-theme="dark"] .doc-idem-note {
  color: #fbbf24;
}

.doc-params-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.doc-params-table th,
.doc-params-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.doc-params-table th {
  color: #64748b;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

[data-bs-theme="dark"] .doc-params-table th,
[data-bs-theme="dark"] .doc-params-table td {
  border-bottom-color: #2e3c52;
}

[data-bs-theme="dark"] .doc-params-table th {
  color: #94a3b8;
}

.doc-param-required {
  color: #dc2626;
  font-weight: 700;
}

[data-bs-theme="dark"] .doc-param-required {
  color: #f87171;
}

.doc-lang-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0;
}

[data-bs-theme="dark"] .doc-lang-tabs {
  border-bottom-color: #2e3c52;
}

.doc-lang-tab {
  background: none;
  border: none;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.doc-lang-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.doc-code-panels {
  background: #0f172a;
  border-radius: 0 0 8px 8px;
  overflow-x: auto;
}

.doc-code-panel {
  display: none;
  margin: 0;
  padding: 16px;
  color: #e2e8f0;
  font-size: 0.82rem;
  line-height: 1.6;
}

.doc-code-panel.active {
  display: block;
}

.doc-console-wrap {
  padding: 20px 16px 60px;
  background: #ffffff;
}

/* Swagger UI ships no dark theme of its own: its opblock colors are low-opacity
   tints designed to sit on a white page, so keep this area on white regardless
   of the site-wide theme toggle to avoid unreadable low-contrast text. */
[data-bs-theme="dark"] .doc-console-wrap {
  background: #ffffff;
}

@media (max-width: 900px) {
  .doc-layout {
    flex-direction: column;
  }
  .doc-sidebar {
    width: 100%;
    position: static;
    max-height: none;
  }
}
