/* CSS Variables for theming */
:root {
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --bg-code: #2a2a3e;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #334155;
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --code-key: #93c5fd;
  --code-string: #86efac;
  --code-number: #fbbf24;
  --code-boolean: #f0abfc;
  --code-punctuation: #cbd5e1;
  --sample-payload-code: #ffffff;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-code: #f8fafc;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-color: #cbd5e1;
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --code-key: #1d4ed8;
  --code-string: #047857;
  --code-number: #b45309;
  --code-boolean: #7e22ce;
  --code-punctuation: #334155;
  --sample-payload-code: #000000;
}

/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: all 0.3s ease;
}

/* Layout */
.container {
  display: flex;
  min-height: calc(100vh - 60px);
  position: relative;
}

/* Sidebar collapse toggle (topbar) */
.sidebar-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  margin-right: 0;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-toggle:hover { color: var(--text-primary); border-color: var(--text-muted); }
.container.sidebar-collapsed .sidebar { display: none; }

/* Topbar */
.topbar {
  height: 60px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.125rem;
}

.vani-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.topbar-nav {
  display: flex;
  gap: 1rem;
}

.topbar-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  font-size: 0.875rem;
}

.topbar-link:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.access-vani-btn {
  background: var(--accent-primary);
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.access-vani-btn:hover {
  background: var(--accent-secondary);
  transform: translateY(-1px);
}

/* Sidebar */
.sidebar {
  width: 280px;
  min-width: 280px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 1.5rem;
  overflow-y: auto;
  height: calc(100vh - 60px);
  position: sticky;
  top: 60px;
  flex-shrink: 0;
}

.nav-section {
  margin-bottom: 2rem;
}

.nav-title {
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-list {
  list-style: none;
}

.nav-item {
  margin-bottom: 0.25rem;
}

.nav-link {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-link:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--accent-primary);
  color: white;
}

/* endpoint count when resource is selected */
.nav-link.accordion-trigger.active > span {
  color: white;
}

/* Separate active states for nav-list and nav-item */
.nav-list {
  transition: all 0.3s ease;
  cursor: pointer;
}

.nav-list:hover {
  background: rgba(59, 130, 246, 0.03);
  border-radius: var(--radius-sm);
}

.nav-list.active {
  background: transparent;
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.nav-item {
  transition: all 0.3s ease;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(59, 130, 246, 0.04);
  border-radius: var(--radius-sm);
}

.nav-item.active {
  background: transparent;
  border-radius: var(--radius-sm);
  margin: 0;
  box-shadow: none;
}

.nav-item.active .nav-link {
  background: transparent;
}

.nav-item.active .nav-link.active {
  color: white;
}

/* Ensure accordion triggers maintain active state */
.accordion-trigger.active {
  background: var(--accent-primary) !important;
  color: white !important;
}

/* Content area */
.content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  width: 100%;
  min-width: 0;
}

.section {
  margin-bottom: 3rem;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
}

.section-title {
  color: var(--text-primary);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Endpoint headings - smaller than main resource heading */
.section-title.endpoint-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
}

.section-description {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  padding-right: 5rem;
}

/* API Stats */
.api-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Content blocks */
.content-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
}

.content-block p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.content-block p:last-of-type {
  margin-bottom: 1.5rem;
}

.highlight-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.highlight-box h4 {
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.highlight-box ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.highlight-box li {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0.75rem;
  padding-left: 0;
}

.highlight-box li:last-child {
  margin-bottom: 0;
}

.highlight-box strong {
  color: var(--text-primary);
}

/* Resource cards */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.resource-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.resource-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.resource-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.resource-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.resource-header h3 a {
  color: var(--text-primary);
  text-decoration: none;
}

.resource-header h3 a:hover {
  color: var(--accent-primary);
}

.endpoint-count {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

.resource-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.resource-actions {
  display: flex;
  gap: 1rem;
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background: var(--accent-secondary);
  transform: translateY(-1px);
}

/* Accordion Navigation Styles */
.accordion-trigger {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  text-transform: capitalize;
}

.accordion-icon {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.accordion-trigger.active .accordion-icon {
  transform: rotate(180deg);
}

.nav-accordion {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  margin: 0.5rem 0 0 0;
}

.nav-accordion.active {
  max-height: 1000px;
  padding: 0.5rem 0;
}

.sub-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem !important;
  padding: 0.5rem 1rem !important;
  margin: 0 !important;
}

.sub-link .method-badge-small {
  flex-shrink: 0;
  margin-right: 0;
}

.sub-link:hover {
  color: var(--text-secondary) !important;
}

.sub-link.active {
  color: var(--accent-primary) !important;
}

/* Resource page specific styles */
.method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 0.75rem;
  width: 70px;
  letter-spacing: 0.025em;
}

.method-GET { background: var(--success); color: white; }
.method-POST { background: var(--accent-primary); color: white; }
.method-PUT { background: var(--warning); color: white; }
.method-DELETE { background: var(--error); color: white; }
.method-PATCH { background: var(--accent-secondary); color: white; }

/* Small method badges for sidebar */
.method-badge-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 0.5rem;
  width: 50px;
  letter-spacing: 0.025em;
  flex-shrink: 0;
}

/* OAuth Scope styles */
.oauth-scopes {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.scopes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.scope-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  font-family: 'Monaco', 'Menlo', monospace;
  letter-spacing: 0.025em;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

/* .scope-badge:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1), var(--shadow-md);
} */

.endpoint-header {
  margin-bottom: 1.5rem;
}

.endpoint-url {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.endpoint-url code {
  color: var(--text-primary);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 1rem;
  font-weight: 600;
}

.parameters-section {
  margin: 2rem 0;
}

.parameters-table-wrapper {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-secondary);
}

.parameters-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-secondary);
}

.parameters-table thead {
  background: var(--bg-tertiary);
}

.parameters-table th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.parameter-row {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.parameter-row:hover {
  background: var(--bg-tertiary);
}

.parameter-row:last-child {
  border-bottom: none;
}

.parameters-table td {
  padding: 1.5rem;
  vertical-align: top;
  border-bottom: 1px solid var(--border-color);
}

.parameter-name {
  font-family: 'Monaco', 'Menlo', monospace;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.parameter-type {
  background: var(--accent-primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  display: inline-block;
}

.parameter-required {
  background: var(--error);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  display: inline-block;
}

.parameter-required-conditional {
  background: var(--success);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  display: inline-block;
}

.parameter-optional {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--text-muted);
  padding: calc(0.25rem - 1px) calc(0.75rem - 1px);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  display: inline-block;
}

.parameter-location {
  background: var(--warning);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  display: inline-block;
}

.parameter-description {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
  margin: 0;
}

.parameter-description code {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.875rem;
  font-family: 'Monaco', 'Menlo', monospace;
  font-weight: 500;
}

.parameter-description a {
  color: var(--accent-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.parameter-description a:hover {
  color: var(--code-key);
}

.parameter-description a.inline-reference-link {
  text-decoration: none;
}

.schema-ref-link {
  position: relative;
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent-primary);
  font-weight: 600;
}

.schema-catalog-section {
  scroll-margin-top: 80px;
}

.cr-notes-section {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

.cr-notes-section h2 {
  margin: 0 0 0.65rem;
  color: var(--text-primary);
  font-size: 1.25rem;
}

.cr-notes-section p {
  margin: 0 0 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cr-note-block {
  margin: 0;
  padding: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
}

/* Enhanced Response section layout */
.response-header {
  margin-bottom: 1.5rem;
}

.response-controls {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 1.5rem;
}

.response-samples-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.75rem;
}

.response-samples-title {
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 750;
  margin: 0;
}

.samples-section {
  margin-top: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  padding: 1rem;
}

.sample-request-section,
.sample-response-section {
  margin-top: 1rem;
}

.response-info-inline {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}

.response-status-inline {
  display: none;
  align-items: center;
  gap: 0.75rem;
}

.response-status-inline.active {
  display: flex;
}

.response-picker-container, .code-picker-container {
  min-width: 220px;
  flex-shrink: 0;
}

.response-picker, .code-picker {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("../../images/down-arrow.svg");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.response-picker:hover, .code-picker:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-secondary);
}

.response-picker:focus, .code-picker:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.response-status-badge, .code-language-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  min-width: 50px;
  letter-spacing: 0.025em;
}

/* Status code colors */
.status-200, .status-201, .status-202, .status-204 {
  background: var(--success);
  color: white;
}

.status-400, .status-401, .status-403, .status-404, .status-409, .status-422 {
  background: var(--error);
  color: white;
}

.status-500, .status-502, .status-503 {
  background: var(--error);
  color: white;
}

.status-300, .status-301, .status-302 {
  background: var(--warning);
  color: white;
}

.response-description, .code-language-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 500;
}

/* Code Examples section */
.code-examples-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1.5rem;
}

.code-examples-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}

.code-language-info {
  display: none;
  align-items: center;
  gap: 0.75rem;
}

.code-language-info.active {
  display: flex;
}

/* Language badge colors */
.code-language-badge {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.code-language-badge.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.code-language-badge[data-language="curl"] {
  background: var(--success);
  color: white;
}

.code-language-badge[data-language="javascript"] {
  background: #f7df1e;
  color: #000;
}

.code-language-badge[data-language="python"] {
  background: #3776ab;
  color: white;
}

/* Responsive design for response and code sections */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    position: relative;
    top: 0;
  }

  .content {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
  }

  .response-controls, .response-samples-header, .code-examples-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .response-picker-container, .code-picker-container {
    width: 100%;
    min-width: unset;
  }

  .response-info-inline, .code-examples-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .response-status-inline, .code-language-info {
    gap: 0.5rem;
  }

  /* Responsive parameters table */
  .parameters-table-wrapper {
    overflow-x: auto;
  }

  .parameters-table {
    min-width: 600px;
  }

  .parameters-table th,
  .parameters-table td {
    padding: 1rem;
  }
}

/* Ensure content doesn't overflow */
* {
  box-sizing: border-box;
}

.content * {
  max-width: 100%;
}

/* Scope Table Styles */

.scope-table-wrapper {

  border: 1px solid var(--border-color);

  border-radius: var(--radius-md);

  overflow: hidden;

  background: var(--bg-secondary);

  margin: 1rem 0;

}



.scope-table {

  width: 100%;

  border-collapse: collapse;

  background: var(--bg-secondary);

  font-size: 0.875rem;

  border: none;

}



.scope-table thead {

  background: var(--bg-tertiary);

}



.scope-table th {

  padding: 0.75rem 1rem;

  text-align: left;

  font-weight: 600;

  color: var(--text-primary);

  border-bottom: 1px solid var(--border-color);

  text-transform: uppercase;

  letter-spacing: 0.025em;

  font-size: 0.8125rem;

}



.scope-table td {

  padding: 0.75rem 1rem;

  color: var(--text-secondary);

  border-bottom: 1px solid var(--border-color);

  vertical-align: top;

}



.scope-table tr:last-child td {

  border-bottom: none;

}



.scope-table tr:hover {

  background: var(--bg-tertiary);

  transition: background-color 0.2s ease;

}



.scope-table td:first-child {

  font-family: 'Monaco', 'Menlo', monospace;

  font-weight: 600;

  color: var(--text-primary);

  border-right: 1px solid var(--border-color);

}



.scope-table td:last-child {

  font-family: 'Monaco', 'Menlo', monospace;

  color: var(--accent-primary);

  font-size: 0.8125rem;

}

/* Fix for code blocks and pre elements */
pre, code {
  overflow-x: auto;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.code-tabs {
  margin: 1rem 0;
}

.tab-btn {
  transition: all 0.3s ease;
}

.tab-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.copy-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.3s ease;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.copy-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

/* Fix for interactive buttons */
.status-btn, .tab-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.status-btn:hover, .tab-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.status-btn.active, .tab-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* Section spacing improvements */
.request-section {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.request-section h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.response-section {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.response-section h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.code-examples {
  margin-top: 1rem;
  padding-top: 1rem;
}

.code-examples-section {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  padding: 1rem;
}

.code-examples-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.parameters-section {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

/* Language Selector Styles */
.language-selector {
  position: relative;
  margin-left: auto;
}

.language-selector select {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  appearance: none;
  background-image: url("../../images/down-arrow.svg");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  transition: all 0.2s ease;
}

.language-selector select:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-tertiary);
}

.language-selector select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.language-selector select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.5rem;
}

/* Integration with existing navigation */
.main-nav .language-selector {
  display: flex;
  align-items: center;
}

.header .language-selector {
  display: flex;
  align-items: center;
}

/* Topbar integration */
.topbar-right .language-selector {
  display: flex;
  align-items: center;
  margin-right: 1rem;
}

.topbar-right .language-selector select {
  font-size: 0.8rem;
  padding: 0.4rem 1.5rem 0.4rem 0.6rem;
  min-width: 120px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .language-selector {
    margin-left: 0;
    margin-top: 0.5rem;
  }
  
  .language-selector select {
    width: 100%;
  }
  
  .topbar-right .language-selector {
    margin-right: 0.5rem;
  }
  
  .topbar-right .language-selector select {
    min-width: 100px;
    font-size: 0.75rem;
  }
}

/* Authentication page specific styles */
.auth-page-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.auth-section-heading {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.auth-method-description {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.auth-learn-more-link {
  color: var(--accent-primary);
  text-decoration: underline;
  margin-left: 0.25rem;
  font-size: 0.875rem;
}

.auth-inline-code {
  background: var(--bg-code);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-left: 0.5rem;
}

.auth-note-paragraph {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.auth-note-link {
  color: var(--accent-primary);
}

.auth-flow-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.auth-steps-list {
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 1.5rem;
}

.auth-example-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.auth-code-block {
  background: var(--bg-code);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 1rem 0;
}

.auth-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.auth-code-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.auth-code-content {
  color: var(--text-primary);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
}

.auth-errors-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.auth-error-item {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.auth-error-item-last {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0;
}

.auth-error-code-401 {
  color: var(--error);
}

.auth-error-code-403 {
  color: var(--error);
}

.auth-error-code-429 {
  color: var(--warning);
}

.auth-scopes-heading {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.auth-scopes-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.auth-scope-item {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

/* Layout navigation styles */
.nav-link-text {
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-endpoint-count {
  margin-left: auto;
  font-size: 0.75rem;
}

/* Quick Start page styles */
.qs-page-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.qs-steps-list {
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 1.5rem;
}

.qs-section-heading {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.qs-section-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.qs-code-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.qs-code-block {
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qs-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}

.qs-code-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.qs-code-content {
  display: block;
  color: var(--text-primary);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 1rem;
  overflow: auto;
  white-space: pre;
  max-width: 100%;
}

.qs-next-steps-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.qs-next-steps-item {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.qs-next-steps-item-last {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0;
}

.qs-copy-btn-margin {
  margin-left: 1rem;
}

/* Resource page styles */
.resource-header-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.resource-scopes-title {
  color: var(--text-primary);
  margin: 0.5rem 0;
  font-size: 0.875rem;
}

.resource-description {
  color: var(--text-secondary);
  margin: 1rem 0;
}

.resource-parameters-heading {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.resource-request-section {
  margin-bottom: 2rem;
}

.resource-request-heading {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.resource-request-block {
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.resource-request-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.resource-request-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.resource-request-code {
  color: var(--text-primary);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.resource-response-heading {
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.resource-response-block {
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 1rem 0;
}

.resource-response-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.resource-response-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.resource-response-code {
  color: var(--text-primary);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.resource-code-examples-heading {
  color: var(--text-primary);
  margin: 0;
}

.resource-code-language-info {
  display: none;
}

.resource-code-language-info-active {
  display: flex;
}

.resource-copy-btn-margin {
  margin-left: 1rem;
}

.resource-response-hidden {
  display: none;
}

/* OpenAPI Download Bar */
.openapi-download-bar {
  margin-bottom: 1.5rem;
}

.openapi-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent-primary);
  text-decoration: none;
  padding: 0.4rem 0.875rem;
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.openapi-download-btn:hover {
  background: var(--accent-primary);
  color: #fff;
}

.openapi-download-icon {
  font-size: 0.75rem;
}

/* Datacenter Selector */
.datacenter-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-top: 1rem;
}

.datacenter-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.datacenter-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-mono);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  min-width: 220px;
  appearance: none;
  background-image: url("../../images/down-arrow.svg");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.datacenter-select:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-tertiary);
}

.datacenter-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.1);
}

.intro-icon {
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 0.875rem;
}

/* Code Examples */
.resource-code-block {
  background: var(--bg-code);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.resource-code-block-hidden {
  display: none;
}

.resource-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.resource-code-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.resource-code-content {
  color: var(--text-primary);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Global hidden utility class */
.hidden {
  display: none !important;
}

/* ==========================================================================
   Schema Catalog interactive schema builder
   ========================================================================== */
.cr-header { margin-bottom: 1.5rem; }

.cr-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-areas:
    "toggle toggle"
    "index  builder";
  gap: 0.9rem 1.5rem;
  align-items: start;
}
.cr-layout.cr-collapsed {
  grid-template-columns: 1fr;
  grid-template-areas:
    "toggle"
    "builder";
}
.cr-layout.cr-collapsed .cr-index { display: none; }
@media (max-width: 900px) {
  .cr-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "toggle"
      "index"
      "builder";
  }
}

.cr-index-toggle {
  grid-area: toggle;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.cr-index-toggle:hover { color: var(--text-primary); border-color: var(--text-muted); }
.cr-index-toggle-icon { font-size: 0.95rem; line-height: 1; }
.cr-index { grid-area: index; }
.cr-builder { grid-area: builder; }

.cr-index {
  position: sticky;
  top: 1rem;
  align-self: start;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  padding: 0.75rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}
.cr-index-search {
  width: 100%;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  font-size: 0.82rem;
  margin-bottom: 0.6rem;
  outline: none;
}
.cr-index-search:focus { border-color: var(--accent-primary); }
.cr-index-list { display: flex; flex-direction: column; }
.cr-index-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.32rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}
.cr-index-link:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.cr-index-link.active { background: var(--accent-primary); color: #fff; font-weight: 600; }
.cr-index-note-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  margin-top: 0.75rem;
}
.cr-index-note-link:hover { border-color: var(--accent-primary); color: var(--text-primary); background: var(--bg-tertiary); }

.cr-builder { min-width: 0; }
.cr-empty { color: var(--text-muted); padding: 2rem 0; }

.cr-obj-head { margin-bottom: 1.25rem; }
.cr-obj-title { font-size: 1.4rem; font-weight: 700; margin: 0 0 0.35rem; scroll-margin-top: 80px; }
.cr-obj-desc { color: var(--text-secondary); font-size: 0.9rem; max-width: 70ch; }
.cr-back-btn {
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
  font-weight: 700;
  cursor: pointer;
}
.cr-back-btn:hover { border-color: var(--accent-primary); }

/* Schema Catalog dictionary layout */
.schema-catalog .cr-header { margin-bottom: 1.4rem; }
.schema-catalog-layout {
  display: block;
}
.schema-nav-panel {
  margin: 0.55rem 0 0.7rem 0.75rem;
  padding-left: 0.65rem;
  border-left: 2px solid var(--border-color);
}
.schema-catalog-toggle-link {
  align-items: center;
  border: 0;
  cursor: pointer;
  display: flex !important;
  font: inherit;
  justify-content: space-between;
  text-align: left;
  width: 100%;
}
.schema-catalog-toggle-icon {
  color: inherit;
  font-size: 1.05rem;
  line-height: 1;
  margin-left: 0.5rem;
}
.schema-nav-toggle {
  width: 100%;
  justify-content: flex-start;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-secondary);
  padding: 0.42rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-align: left;
}
.schema-nav-toggle:hover { color: var(--text-primary); border-color: var(--accent-primary); }
.schema-nav-body { margin-top: 0.5rem; }
.schema-nav-panel.cr-collapsed .schema-nav-body { display: none; }
.schema-nav-search {
  width: 100%;
  margin: 0 0 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 0.45rem 0.55rem;
  font-size: 0.76rem;
}
.schema-nav-list {
  display: grid;
  gap: 0.18rem;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 0.15rem;
}
.schema-nav-link {
  display: block;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 0.35rem 0.5rem;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.schema-nav-link:hover,
.schema-nav-link.active { background: var(--bg-tertiary); color: var(--accent-primary); }
.schema-catalog-content {
  min-width: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  overflow: hidden;
}
.schema-entry { padding: 1.25rem; border-bottom: 1px solid var(--border-color); scroll-margin-top: 80px; }
.schema-entry:last-child { border-bottom: 0; }
.schema-entry-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.5rem; }
.schema-entry-summary h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.schema-entry-summary p { color: var(--text-secondary); font-size: 0.82rem; }
.schema-field-table { border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-primary); }
.schema-field-row { display: grid; grid-template-columns: 190px 140px minmax(0, 1fr); border-bottom: 1px solid var(--border-color); }
.schema-field-row:last-child { border-bottom: 0; }
.schema-choice-group {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}
.schema-choice-head {
  padding: 0.8rem 0.85rem;
  border-right: 1px solid rgba(59, 130, 246, 0.24);
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-secondary);
  box-shadow: inset 3px 0 0 rgba(59, 130, 246, 0.72);
}
.schema-choice-head strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.82rem;
  margin-bottom: 0.18rem;
}
.schema-choice-head span { display: block; font-size: 0.76rem; }
.schema-choice-rows .schema-field-row { grid-template-columns: 190px 140px minmax(0, 1fr); }
.schema-choice-rows .schema-field-row:last-child { border-bottom: 0; }
.schema-choice-row .schema-field-name { background: rgba(59, 130, 246, 0.045); }
.schema-field-name {
  padding: 0.75rem 0.85rem;
  border-right: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.schema-field-type {
  padding: 0.75rem 0.85rem;
  border-right: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.schema-type-link {
  display: inline;
  max-width: 100%;
  min-width: 0;
  color: #2563eb;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-decoration: none;
  text-underline-offset: 2px;
  white-space: normal;
  word-break: break-word;
}
.schema-type-link:hover { color: var(--accent-primary); text-decoration: underline; }
.schema-field-desc { padding: 0.75rem 0.85rem; color: var(--text-secondary); font-size: 0.86rem; min-width: 0; overflow-wrap: anywhere; }
.schema-enum-details {
  margin-top: 0.55rem;
}
.schema-enum-details summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  list-style: none;
}
.schema-enum-details summary::-webkit-details-marker { display: none; }
.schema-enum-icon::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--accent-primary);
  font-size: 0.8rem;
  line-height: 1;
}
.schema-enum-details[open] .schema-enum-icon::before { content: "−"; }
.schema-enum-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: 0.5rem;
}
.schema-enum-values code {
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 0.68rem;
  padding: 0.12rem 0.42rem;
}
.schema-ref-link {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  margin-top: 0.25rem;
  max-width: calc(100% - 0.35rem);
  min-width: 0;
  min-height: 1.45rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.24);
  color: #2563eb;
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
  word-break: break-word;
}
.schema-ref-link:hover { color: var(--accent-primary); background: rgba(59, 130, 246, 0.1); }
.schema-catalog .schema-ref-link {
  border-bottom: 0;
  max-width: calc(100% - 0.35rem);
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}
.schema-catalog .cr-index-link {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}
[data-theme="dark"] .schema-ref-link {
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(147, 197, 253, 0.28);
  color: #93c5fd;
}
[data-theme="dark"] .schema-ref-link:hover {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(147, 197, 253, 0.45);
  color: #bfdbfe;
}
[data-theme="dark"] .schema-type-link {
  color: #93c5fd;
}
[data-theme="dark"] .schema-type-link:hover {
  color: #bfdbfe;
}
[data-theme="dark"] .schema-choice-head {
  background: rgba(96, 165, 250, 0.12);
  border-right-color: rgba(147, 197, 253, 0.28);
  box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.72);
}
.schema-subtype-note { color: var(--text-primary); font-weight: 700; margin-bottom: 0.35rem; }
.schema-subtype-list { margin: 0.35rem 0 0; padding-left: 1.1rem; }
.schema-subtype-list li { margin: 0.2rem 0; }
@media (max-width: 1200px) {
  .schema-entry-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 1rem; }
  .schema-field-row,
  .schema-choice-rows .schema-field-row { grid-template-columns: 140px 88px minmax(0, 1fr); }
  .schema-choice-group { grid-template-columns: 150px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .schema-catalog-layout { grid-template-columns: 1fr; grid-template-areas: "index" "builder"; height: auto; min-height: 0; }
  .schema-catalog-layout.cr-collapsed { grid-template-areas: "index" "builder"; }
  .schema-catalog-layout .cr-index,
  .schema-catalog-content { max-height: none; overflow: visible; }
  .schema-entry-layout { grid-template-columns: 1fr; gap: 0.8rem; }
  .schema-field-row { grid-template-columns: 1fr; }
  .schema-choice-group { grid-template-columns: 1fr; }
  .schema-choice-head { border-right: 0; border-bottom: 1px solid rgba(59, 130, 246, 0.22); }
  .schema-choice-rows .schema-field-row { grid-template-columns: 1fr; }
  .schema-field-name,
  .schema-field-type { border-right: 0; border-bottom: 1px solid var(--border-color); }
}
.cr-back-row { border-top: 1px solid var(--border-color); margin-top: 1rem; padding-top: 1rem; }

.cr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 700px) { .cr-grid { grid-template-columns: 1fr; } }

.cr-form { min-width: 0; }
.cr-field { padding: 0.75rem 0; border-bottom: 1px solid var(--border-color); }
.cr-field:last-child { border-bottom: none; }
.cr-field-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.cr-fname { font-family: 'Monaco', 'Menlo', monospace; font-weight: 700; font-size: 0.86rem; color: var(--text-primary); }
.cr-ftype { font-family: 'Monaco', 'Menlo', monospace; font-size: 0.74rem; color: var(--accent-secondary); }
.cr-pill { font-size: 0.62rem; font-weight: 700; padding: 0.12rem 0.5rem; border-radius: 999px; letter-spacing: 0.03em; }
.cr-pill.cr-req { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.cr-pill.cr-opt { background: rgba(100, 116, 139, 0.18); color: var(--text-muted); }
.cr-pill.cr-when { background: rgba(245, 158, 11, 0.14); color: #fbbf24; }
.cr-pill.cr-choose { background: var(--accent-secondary); color: #fff; }
.cr-pill.cr-disabled { background: rgba(107, 114, 128, 0.16); color: var(--text-muted); }
.cr-disabled-note { color: var(--text-muted); }
.cr-field:has(.cr-disabled) { opacity: 0.72; }
.cr-include-lbl { margin-left: auto; font-size: 0.74rem; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; }
.cr-include { accent-color: var(--accent-primary); cursor: pointer; }
.cr-fdesc { color: var(--text-secondary); font-size: 0.82rem; margin: 0.3rem 0; }
.cr-default, .cr-criteria { color: var(--text-muted); display: block; font-size: 0.76rem; margin-top: 0.3rem; }
.cr-fdesc code, .cr-note code, .cr-default code, .cr-criteria code { font-family: 'Monaco', 'Menlo', monospace; font-size: 0.78em; background: var(--bg-code); color: var(--accent-primary); padding: 0.05rem 0.3rem; border-radius: 3px; }
.cr-control { margin-top: 0.35rem; }
.cr-input {
  width: 100%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.6rem;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.82rem;
  outline: none;
}
.cr-input:focus { border-color: var(--accent-primary); }
.cr-readonly-value { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary); padding: 0.5rem 0.6rem; }
.cr-readonly-value code { color: var(--accent-primary); font-family: 'Monaco', 'Menlo', monospace; font-size: 0.82rem; }
.cr-enum-values { margin-top: 0.5rem; }
.cr-enum-values summary { color: var(--text-muted); cursor: pointer; font-size: 0.76rem; }
.cr-enum-list { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.cr-enum-value { background: var(--bg-code); border: 1px solid var(--border-color); border-radius: 999px; color: var(--text-primary); cursor: pointer; font-family: 'Monaco', 'Menlo', monospace; font-size: 0.68rem; padding: 0.16rem 0.45rem; }
.cr-enum-value:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.cr-note { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }

.cr-ref-launcher {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  padding: 0.65rem;
}
.cr-ref-status strong,
.cr-ref-status span { display: block; }
.cr-ref-status strong { color: var(--text-primary); font-size: 0.84rem; }
.cr-ref-status span { color: var(--text-muted); font-size: 0.74rem; }
.cr-ref-btn {
  background: var(--accent-primary);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.cr-ref-btn:hover { filter: brightness(1.05); }

/* union + nested groups */
.cr-union-field { border-bottom: none; }
.cr-union-member { border-left: 2px solid var(--accent-secondary); padding-left: 0.85rem; margin-top: 0.5rem; }
.cr-field .cr-field { padding-left: 0.85rem; border-left: 2px dashed var(--border-color); }

/* JSON payload pane */
.cr-pane {
  position: sticky;
  top: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0b1020;
}
[data-theme="light"] .cr-pane { background: #0f172a; }
.cr-pane-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0.85rem; border-bottom: 1px solid #1e293b;
  font-size: 0.74rem; color: #94a3b8; font-family: 'Monaco', 'Menlo', monospace;
}
.cr-copy {
  background: rgba(59, 130, 246, 0.15); color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4); border-radius: var(--radius-sm);
  padding: 0.28rem 0.7rem; font-size: 0.74rem; font-weight: 600; cursor: pointer;
}
.cr-copy:hover { background: rgba(59, 130, 246, 0.25); }
.cr-json {
  margin: 0; padding: 1rem; overflow-x: auto;
  font-family: 'Monaco', 'Menlo', monospace; font-size: 0.8rem; line-height: 1.7; color: #cbd5e1;
}
.cr-json code { background: none; padding: 0; color: inherit; }
.cr-jk { color: #7dd3fc; }
.cr-js { color: #86efac; }
.cr-jp { color: #c4b5fd; }

/* ── Read-only request-body structure tree (container-driven) ───────────── */
.request-structure-section { margin: 1.5rem 0 2rem; }
.request-structure-heading { color: var(--text-primary); margin: 0 0 0.35rem; }
.request-body-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.request-body-intro p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin: 0;
}
.request-body-ref {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: var(--accent-primary);
  background: var(--bg-secondary);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.request-body-ref:hover { border-color: var(--accent-primary); color: var(--text-primary); }
.request-structure-envelope {
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  overflow-x: auto;
}
.request-structure-envelope .rs-k { color: var(--accent-primary); }
.request-structure { font-size: 0.9rem; }

.condition-schema-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.7rem;
}
.condition-schema-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  padding: 0.65rem 0.75rem;
}
.condition-schema-title { color: var(--text-primary); font-weight: 700; font-size: 0.82rem; }
.condition-schema-desc { color: var(--text-secondary); font-size: 0.8rem; margin-top: 0.15rem; }
.condition-schema-code {
  margin: 0.45rem 0 0;
  white-space: pre-wrap;
  color: var(--text-primary);
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
}
.condition-schema-code code { color: inherit; background: transparent; padding: 0; }
.rs-root-desc {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.85rem;
}
.rs-list { list-style: none; margin: 0; padding: 0; }
.rs-children .rs-list {
  margin-top: 0.4rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border-color);
}
.rs-node {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-color);
}
.rs-node:last-child { border-bottom: none; }
.rs-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.rs-name {
  font-family: 'Monaco', 'Menlo', monospace;
  font-weight: 600;
  color: var(--text-primary);
  background: none;
  padding: 0;
}
.rs-type {
  color: var(--accent-secondary);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.8rem;
}
.rs-req {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}
.rs-req-required { background: var(--error); color: #fff; }
.rs-req-conditional { background: var(--success); color: #fff; }
.rs-req-optional { color: var(--text-muted); border: 1px solid var(--text-muted); }
.rs-container {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--accent-primary);
  text-decoration: none;
  border: 1px dashed var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 0.05rem 0.45rem;
}
.rs-container:hover { background: rgba(59,130,246,0.1); }
.rs-desc {
  flex-basis: 100%;
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 0.86rem;
  margin-top: 0.25rem;
}
.rs-desc code {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  font-size: 0.82rem;
}
.rs-children { margin-top: 0.35rem; }
.rs-summary {
  cursor: pointer;
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
  padding: 0.15rem 0;
  list-style: none;
}
.rs-summary::-webkit-details-marker { display: none; }
.rs-summary::before { content: "▸ "; }
details[open] > .rs-summary::before { content: "▾ "; }
.rs-cyclic { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }
.rs-missing { color: var(--error); }

/* ── Long request/response payloads: always a small scrollable box ──────── */
/* Cap the height in CSS so the content is ALWAYS a small scrollable div,
   independent of any JS. The Expand toggle only lifts the cap. */
.resource-response-code,
.request-body-code,
.resource-request-code {
  display: block;
  max-height: 22rem;
  overflow: auto;
}
.longdata { position: relative; }
.longdata.is-open > code { max-height: none; }
.longdata-toggle {
  margin-top: 0.5rem;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.longdata-toggle:hover { background: var(--bg-tertiary); }

/* ═══ Request-body structure flowchart (req-builder.js) ═══════════════════ */
.req-builder { margin: 1.1rem 0 1.75rem; }
.rb-error { color: var(--error); font-family: 'Monaco','Menlo',monospace; font-size: 0.85rem; }
.rb-flowtools { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem; }
.rb-split .rb-flowtools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.rb-flowtools-left,
.rb-flowtools-right { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.rb-flowtools-right { justify-content: flex-end; }
.rb-flowhint { font-size: .82rem; color: var(--text-muted); max-width: 60ch; line-height: 1.5; }
.rb-flowhint b { color: var(--text-secondary); font-weight: 600; }
.rb-expand { font-size: .74rem; color: var(--text-secondary); background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: .28rem .6rem; cursor: pointer; }
.rb-expand:hover,
.rb-expand:focus-visible { border-color: var(--text-muted); color: var(--text-primary); outline: none; }
.rb-mini { display: inline-flex; gap: .3rem; flex: 0 0 auto; }
.rb-mini button { font-size: .74rem; color: var(--text-secondary); background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: .28rem .6rem; cursor: pointer; }
.rb-mini button:hover { border-color: var(--text-muted); color: var(--text-primary); }

.rb-cols { display: block; transition: all .22s ease; }
.rb-left { min-width: 0; }
.rb-right { display: none; min-width: 0; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--bg-secondary); box-shadow: var(--shadow-sm); overflow: hidden; }
.rb-split .rb-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: stretch; }
.rb-split .rb-left { display: flex; min-height: 0; height: 70vh; }
.rb-split .rb-right { display: flex; flex-direction: column; height: 70vh; animation: rbPanelIn .18s ease-out; }
.rb-split .rb-left .rb-tree.rb-root { flex: 1 1 auto; height: 100%; max-height: none; overflow: auto; }
.rb-right-hd { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem .9rem; border-bottom: 1px solid var(--border-color); background: var(--bg-tertiary); font-weight: 700; }
.rb-right-note { color: var(--text-muted); font-size: .75rem; font-weight: 500; }
.rail-card, .card { display: flex; flex-direction: column; min-height: 0; height: 100%; width: 100%; }
.card-hd { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem .9rem; border-bottom: 1px solid var(--border-color); background: var(--bg-tertiary); font-weight: 700; }
.card-hd .t { color: var(--text-primary); }
.langs { display: flex; gap: .35rem; padding: .65rem .9rem; border-bottom: 1px solid var(--border-color); flex-wrap: wrap; }
.langs button { color: var(--text-secondary); background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: .3rem .65rem; cursor: pointer; font-size: .75rem; }
.langs button:hover { color: var(--accent-primary); background: var(--bg-primary); border-color: var(--accent-primary); }
.langs button.on,
.langs button.on:hover { color: #fff; background: var(--accent-primary); border-color: var(--accent-primary); }
.rb-codewrap { position: relative; display: flex; flex: 1 1 auto; min-height: 0; }
.rb-payload { flex: 1 1 auto; width: 100%; margin: 0; min-height: 0; max-height: none; overflow: auto; padding: 1rem; background: var(--bg-code); color: var(--sample-payload-code); font-family: 'Monaco','Menlo',monospace; font-size: .78rem; line-height: 1.55; white-space: pre; }
.card-foot { padding: .55rem .9rem; color: var(--text-muted); font-size: .74rem; border-top: 1px solid var(--border-color); }
.rb-copy { position: absolute; top: .6rem; right: .6rem; z-index: 1; }
.rb-payload .rb-k,
.rb-payload .rb-s,
.rb-payload .rb-n,
.rb-payload .rb-b,
.rb-payload .rb-p { color: var(--sample-payload-code); }
.rb-k { color: var(--code-key); }
.rb-s { color: var(--code-string); }
.rb-n { color: var(--code-number); }
.rb-b { color: var(--code-boolean); }
.rb-p { color: var(--code-punctuation); }
@keyframes rbPanelIn { from { opacity: 0; transform: translateX(.5rem); } to { opacity: 1; transform: translateX(0); } }

/* tree card */
.rb-tree.rb-root { border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--bg-secondary); box-shadow: var(--shadow-sm); padding: .5rem .75rem; overflow-x: auto; }

/* nodes + connector rails */
.rb-node { position: relative; }
.rb-node-row { display: flex; align-items: flex-start; gap: .5rem; padding: .4rem .35rem; border-radius: var(--radius-sm); cursor: default; }
.rb-node-row:hover { background: color-mix(in srgb, var(--bg-tertiary) 55%, transparent); }
.rb-check { margin-top: .2rem; accent-color: var(--accent-primary); flex: 0 0 auto; }
.rb-flow:not(.rb-split) .rb-check { display: none; }
.rb-check:disabled { opacity: .65; cursor: not-allowed; }
.rb-caret { border: 0; background: none; cursor: pointer; color: var(--text-muted); width: 1.1rem; height: 1.25rem; display: grid; place-items: center; flex: 0 0 auto; font-size: .72rem; padding: 0; }
.rb-caret.rb-open { color: var(--text-primary); }
.rb-caret.rb-leaf { cursor: default; color: var(--border-strong, var(--border-color)); }

/* the indentation rail for a node's children */
.rb-kids { display: none; margin-left: .55rem; padding-left: .85rem; border-left: 1px solid var(--border-color); }
.rb-kids.rb-kids-open { display: block; }

.rb-mid { flex: 1; min-width: 0; }
.rb-name-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.rb-fname { font-family: 'Monaco','Menlo',monospace; font-weight: 650; color: var(--text-primary); background: none; padding: 0; font-size: .85rem; }
.rb-ftype { font-family: 'Monaco','Menlo',monospace; font-size: .7rem; color: var(--accent-secondary); border: 1px solid var(--border-color); border-radius: 5px; padding: .02rem .35rem; }
.rb-badge { font-family: 'Monaco','Menlo',monospace; font-size: .62rem; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; border-radius: 4px; padding: .05rem .35rem; }
.rb-req { color: #fff; background: var(--error); }
.rb-cond { color: #fff; background: var(--warning); }
.rb-opt { color: var(--text-muted); border: 1px solid var(--text-muted); }
.rb-when { font-size: .7rem; color: var(--text-muted); }
.rb-when code { background: var(--bg-tertiary); padding: .02rem .3rem; border-radius: 3px; }
.rb-from { font-size: .66rem; letter-spacing: .03em; text-transform: uppercase; font-weight: 600; color: var(--accent-primary); background: color-mix(in srgb, var(--accent-primary) 12%, transparent); border-radius: 999px; padding: .05rem .45rem; }
.rb-container { margin-left: auto; font-size: .8rem; color: var(--accent-primary); text-decoration: none; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 0 .4rem; }
.rb-container:hover { border-color: var(--accent-primary); }
.rb-desc { font-size: .83rem; color: var(--text-secondary); margin-top: .15rem; line-height: 1.5; }
.rb-desc code { background: var(--bg-tertiary); color: var(--accent-primary); padding: .03rem .3rem; border-radius: 3px; font-size: .8rem; }
.rb-enums { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.rb-echip { font-family: 'Monaco','Menlo',monospace; font-size: .67rem; color: var(--text-secondary); background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: 999px; padding: .04rem .45rem; }
.rb-enumsel-wrap { display: flex; align-items: flex-start; gap: .4rem; margin-top: .4rem; }
.rb-enumsel-lbl { font-size: .74rem; color: var(--text-muted); }
.rb-enumpicker { position: relative; width: min(18rem, 100%); }
.rb-enumsel { width: 100%; text-align: left; font-family: 'Monaco','Menlo',monospace; font-size: .76rem; background: var(--bg-primary); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: .28rem 1.65rem .28rem .5rem; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-enumsel.empty { color: var(--text-muted); font-style: italic; }
.rb-enumsel:hover { border-color: var(--accent-primary); }
.rb-enumlist { display: none; position: absolute; z-index: 6; left: 0; right: 0; top: calc(100% + .25rem); max-height: 12rem; overflow-y: auto; overscroll-behavior: contain; padding: .25rem; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.rb-enumpicker.open .rb-enumlist { display: block; }
.rb-enumitem { display: block; width: 100%; text-align: left; font-family: 'Monaco','Menlo',monospace; font-size: .72rem; color: var(--text-secondary); background: transparent; border: 0; border-radius: var(--radius-sm); padding: .3rem .45rem; cursor: pointer; }
.rb-enumitem:hover, .rb-enumitem.on { color: var(--text-primary); background: var(--bg-tertiary); }
.rb-enumempty { color: var(--text-muted); font-style: italic; }
.rb-filewrap { display: inline-flex; align-items: center; gap: .4rem; margin-top: .4rem; font-size: .74rem; color: var(--text-secondary); background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: .28rem .55rem; cursor: pointer; max-width: 100%; }
.rb-filewrap:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.rb-filelabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 18rem; }
.rb-fileinput { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rb-cyclic { font-size: .78rem; color: var(--text-muted); padding: .2rem 0 .4rem; }
.rb-cyclic code { background: var(--bg-tertiary); padding: .02rem .3rem; border-radius: 3px; }

/* reference banner inside Request body (links to the Schema Catalog container) */
.rb-refbar { font-size: .84rem; color: var(--text-secondary); line-height: 1.5; background: color-mix(in srgb, var(--accent-primary) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent-primary) 30%, var(--border-color)); border-left: 3px solid var(--accent-primary); border-radius: var(--radius-md); padding: .6rem .85rem; margin-bottom: .85rem; }
.rb-refbar a { color: var(--accent-primary); font-weight: 600; }
.rb-refbar-link { display: inline-block; margin-top: .2rem; white-space: nowrap; }
.rb-refbar-lead { margin: 0; }
.rb-notes { margin-top: .7rem; padding-top: .6rem; border-top: 1px solid color-mix(in srgb, var(--accent-primary) 22%, var(--border-color)); }
.rb-notes-title { display: block; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--text-muted); margin-bottom: .45rem; }
.rb-notes-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.rb-notes-list li { display: flex; align-items: flex-start; gap: .55rem; }
.rb-notes-list .rb-badge { flex: 0 0 auto; margin-top: .1rem; }

.cr-reference-tree .rb-tree.rb-root { padding: .75rem .9rem; }
.rb-flow-ref .rb-node-row { cursor: default; }

@media (max-width: 900px) {
  .rb-split .rb-cols { grid-template-columns: 1fr; }
  .rb-split .rb-flowtools { grid-template-columns: 1fr; }
  .rb-flowtools-right { justify-content: flex-start; }
  .rb-split .rb-left .rb-tree.rb-root, .rb-payload { max-height: none; }
}
