/* 
  DeckFlow Documentation stylesheet
  Modern Premium Visual System with Light & Dark Modes
*/

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Inter:ital,wght@0,300..800;1,300..800&family=Outfit:wght@300..900&display=swap');

:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-sidebar: #f8fafc;
  --bg-topbar: rgba(255, 255, 255, 0.82);
  --border-color: #e2e8f0;
  --border-accent: rgba(99, 102, 241, 0.12);
  --code-inline-bg: rgba(9, 9, 11, 0.04);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --color-primary: #6366f1; /* Indigo */
  --color-primary-soft: rgba(99, 102, 241, 0.08);
  --color-accent: #06b6d4; /* Cyan */
  --color-accent-soft: rgba(6, 182, 212, 0.08);
  --color-success: #10b981;
  --color-success-soft: rgba(16, 185, 129, 0.1);
  --color-warning: #f59e0b;
  --color-warning-soft: rgba(245, 158, 11, 0.1);
  --color-danger: #ef4444;
  --color-danger-soft: rgba(239, 68, 68, 0.1);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-premium: 0 20px 40px -15px rgba(15, 23, 42, 0.06);
  
  --code-bg: #0f172a;
  --code-text: #cbd5e1;
  --scrollbar-thumb: #cbd5e1;
  
  --gradient-bg: radial-gradient(circle at top left, rgba(99, 102, 241, 0.06), transparent 30%),
                 radial-gradient(circle at 85% 15%, rgba(6, 182, 212, 0.06), transparent 25%),
                 #ffffff;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-primary: #070a13;
  --bg-surface: #0e1322;
  --bg-sidebar: #090c16;
  --bg-topbar: rgba(7, 10, 19, 0.85);
  --border-color: #334155;
  --border-accent: rgba(99, 102, 241, 0.22);
  --code-inline-bg: rgba(255, 255, 255, 0.06);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --color-primary: #818cf8; /* Light Indigo */
  --color-primary-soft: rgba(129, 140, 248, 0.15);
  --color-accent: #22d3ee; /* Light Cyan */
  --color-accent-soft: rgba(34, 211, 238, 0.15);
  --color-success: #34d399;
  --color-success-soft: rgba(52, 211, 153, 0.15);
  --color-warning: #fbbf24;
  --color-warning-soft: rgba(251, 191, 36, 0.15);
  --color-danger: #f87171;
  --color-danger-soft: rgba(248, 113, 113, 0.15);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  --shadow-premium: 0 20px 45px -15px rgba(0, 0, 0, 0.6);
  
  --code-bg: #030712;
  --code-text: #e5e7eb;
  --scrollbar-thumb: #334155;
  
  --gradient-bg: radial-gradient(circle at top left, rgba(99, 102, 241, 0.12), transparent 35%),
                 radial-gradient(circle at 85% 15%, rgba(6, 182, 212, 0.1), transparent 30%),
                 #070a13;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--gradient-bg);
  color: var(--text-secondary);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--color-accent);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Inter', sans-serif;
  color: var(--text-primary);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

/* Structure Layout */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-topbar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  min-height: 68px;
  margin: 0 auto;
  padding: 0 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
}

.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  padding: 6px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}
.brand-copy strong {
  font-size: 1.05rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.brand-copy span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Theme Toggle Button */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}
.theme-toggle:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.25s ease;
}
.lang-toggle {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0 12px;
  height: 40px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}
.lang-toggle:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.top-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 99px;
  background: var(--text-primary);
  color: var(--bg-surface) !important;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0 20px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.top-cta:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

/* Tabs Bar */
.tabs-bar {
  position: sticky;
  top: 68px;
  z-index: 50;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-topbar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tabs-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px;
}
.top-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  color: var(--text-secondary);
  font-size: 0.94rem;
  font-weight: 550;
  transition: color 0.15s ease;
}
.top-tab:hover {
  color: var(--text-primary);
}
.top-tab.active {
  color: var(--color-primary);
  font-weight: 700;
}
.top-tab.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 99px;
  background: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary);
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 240px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  background: var(--bg-surface);
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 124px;
  align-self: start;
  height: calc(100vh - 124px);
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  background: var(--bg-sidebar);
  padding: 32px 24px 64px 28px;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.sidebar-group + .sidebar-group {
  margin-top: 32px;
}
.sidebar-label {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.sidebar a {
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.sidebar a:hover {
  background: var(--color-primary-soft);
  color: var(--text-primary);
  padding-left: 16px;
}
.sidebar a.active {
  background: var(--color-primary);
  color: var(--bg-surface) !important;
  font-weight: 600;
  box-shadow: 0 4px 12px var(--color-primary-soft);
}

/* Content Area */
.content {
  min-width: 0;
  padding: 32px 56px 96px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 500;
}
.breadcrumbs .sep {
  color: var(--border-color);
  font-weight: 300;
}

/* Hero Section */
.hero {
  padding: 20px 0 32px;
  border-bottom: 1px solid var(--border-color);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--border-accent);
}
.hero h1 {
  margin: 16px 0 8px;
  font-size: 2.2rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.lead {
  max-width: 800px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Documentation Body */
.doc-body, .api-doc-details {
  padding-top: 36px;
}
.doc-body h2, .api-doc-details h2 {
  margin: 48px 0 16px;
  font-size: 1.8rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  scroll-margin-top: 140px;
}
.doc-body h3, .api-doc-details h3 {
  margin: 32px 0 12px;
  font-size: 1.3rem;
  line-height: 1.3;
  scroll-margin-top: 140px;
}
.doc-body h4, .api-doc-details h4 {
  margin: 24px 0 10px;
  font-size: 1.1rem;
  scroll-margin-top: 140px;
}
.doc-body p, .api-doc-details p {
  margin: 0 0 18px;
  color: var(--text-secondary);
}

/* Bullets and Numbered Lists */
.doc-body ul, .api-doc-details ul, .doc-body ol, .api-doc-details ol {
  margin: 0 0 20px;
  padding-left: 24px;
}
.doc-body li, .api-doc-details li {
  margin-bottom: 8px;
}
.doc-body li::marker, .api-doc-details li::marker {
  color: var(--color-primary);
}

/* Tables styling */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  margin: 24px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
tr:last-child td {
  border-bottom: 0;
}
tr:hover td {
  background: rgba(99, 102, 241, 0.015);
}

/* Styled inline code & badges in tables */
table code {
  font-family: 'Fira Code', ui-monospace, monospace;
  background: var(--code-inline-bg, var(--bg-primary)) !important;
  color: var(--color-primary) !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  font-size: 0.84em !important;
  border: 1px solid var(--border-color) !important;
  white-space: nowrap;
}

/* Status/Type color pills for values inside tables */
td:first-child strong {
  color: var(--text-primary);
}
td:nth-child(2) code {
  /* parameters and attributes */
  background: var(--code-inline-bg, var(--bg-primary)) !important;
  color: var(--color-accent) !important;
  border: 1px solid var(--border-color) !important;
}

/* Badge highlights */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
}
.badge-success { background: var(--color-success-soft); color: var(--color-success); }
.badge-warning { background: var(--color-warning-soft); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-soft); color: var(--color-danger); }

/* HTTP Method Badge Styles */
.badge-post {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
}
:root[data-theme="light"] .badge-post {
  background: rgba(14, 165, 233, 0.08);
  color: #0284c7;
}

.badge-get {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
:root[data-theme="light"] .badge-get {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
}

.badge-delete {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}
:root[data-theme="light"] .badge-delete {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}

/* Code Block and Code Groups */
code {
  font-family: 'Fira Code', ui-monospace, monospace;
  background: var(--code-inline-bg, var(--bg-primary));
  color: var(--color-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.12rem 0.35rem;
  font-size: 0.88em;
  transition: all 0.25s ease;
}

pre {
  position: relative;
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px 20px;
  margin: 18px 0;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  box-shadow: var(--shadow-md);
  transition: border-color 0.25s ease;
}
pre code {
  background: transparent;
  color: inherit;
  border: 0;
  padding: 0;
  font-size: inherit;
}

/* Code block language tag header */
pre[data-label]::before {
  content: attr(data-label);
  position: absolute;
  top: 0;
  right: 68px;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.6;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 0 6px 6px;
  pointer-events: none;
}

/* Copy button */
.copy-code-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #94a3b8;
  padding: 6px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.copy-code-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.copy-code-btn.copied {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}
.copy-code-btn svg {
  width: 14px;
  height: 14px;
}

/* CodeGroup with tabs bar styling */
.code-group {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--code-bg);
  box-shadow: var(--shadow-md);
  margin: 20px 0;
  overflow: hidden;
}
.code-group pre {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.code-group-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 12px 0;
}
.code-group-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  transition: all 0.15s ease;
}
.code-group-tab:hover {
  color: #fff;
}
.code-group-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Callouts and warnings */
.callout {
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--color-primary);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
  background: var(--bg-surface);
}
.callout-info {
  border-left-color: var(--color-primary);
  background: var(--color-primary-soft);
}
.callout-warn {
  border-left-color: var(--color-warning);
  background: var(--color-warning-soft);
}
.callout strong {
  display: block;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.callout p:last-child {
  margin-bottom: 0;
}

/* Blockquote */
blockquote {
  border-left: 4px solid var(--color-accent);
  background: var(--color-accent-soft);
  margin: 24px 0;
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
}
blockquote p:last-child {
  margin-bottom: 0;
}

/* On This Page TOC */
.toc {
  position: sticky;
  top: 124px;
  align-self: start;
  height: calc(100vh - 124px);
  overflow-y: auto;
  border-left: 1px solid var(--border-color);
  padding: 32px 20px 64px 24px;
  background: transparent;
  transition: border-color 0.25s ease;
}
.toc h3 {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.toc nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toc a {
  border-left: 2px solid transparent;
  padding: 2px 0 2px 12px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.toc a:hover {
  color: var(--text-primary);
  border-left-color: var(--border-color);
}
.toc a.active {
  color: var(--color-primary);
  font-weight: 600;
  border-left-color: var(--color-primary);
}
.toc a.toc-sub {
  padding-left: 22px;
  font-size: 0.82rem;
}

/* Cards grids */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.card {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-premium);
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 16px;
}
.card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.card p {
  margin: 0;
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 1280px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
}

@media (max-width: 900px) {
  .topbar-inner {
    padding: 0 20px;
  }
  .tabs-inner {
    padding: 0 20px;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
  }
  .content {
    padding: 28px 20px 64px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   API Split-Layout Visual System (HeyGen Style)
   ========================================== */

.layout.api-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 0;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.api-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  background: var(--bg-surface);
  min-height: calc(100vh - 108px); /* Account for topbar & tabsbar */
}

.api-doc-flow {
  padding: 32px 56px 96px;
  max-width: 910px;
  width: 100%;
  box-sizing: border-box;
}

.api-code-panel {
  background: var(--bg-sidebar); /* Matches left sidebar/primary offset background */
  border-left: 1px solid var(--border-color);
  padding: 40px 24px;
  color: var(--text-secondary);
  position: sticky;
  top: 108px;
  height: calc(100vh - 108px);
  overflow-y: auto;
  box-sizing: border-box;
}

/* Sidebar Custom Grouping Titles */
.sidebar-group-title {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 750;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 22px 0 6px 12px;
  padding: 0;
  opacity: 0.8;
}

.sidebar-sub-item {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px 7px 20px !important;
  font-size: 13.5px !important;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  margin-bottom: 2px;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.sidebar-sub-item:hover {
  background: rgba(99, 102, 241, 0.03);
  color: var(--text-primary);
}

.sidebar-sub-item.active {
  background: var(--color-primary-soft);
  color: var(--color-primary) !important;
  border-left: 2px solid var(--color-primary) !important;
  font-weight: 600;
}

/* HTTP Method Badge tags */
.method-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 8.5px;
  font-weight: 800;
  padding: 2.5px 5px;
  border-radius: 4px;
  line-height: 1;
  text-transform: uppercase;
}

.method-tag.post {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
}
:root[data-theme="light"] .method-tag.post {
  background: rgba(14, 165, 233, 0.08);
  color: #0284c7;
}

.method-tag.get {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
:root[data-theme="light"] .method-tag.get {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
}

.method-tag.delete {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}
:root[data-theme="light"] .method-tag.delete {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}

/* Right-side Code Console Snippets styling (HeyGen / Mintlify style) */
.api-code-panel pre .copy-code-btn {
  display: none !important; /* Hide auto-generated copy buttons in code panels */
}

.api-code-section {
  margin-bottom: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  /* overflow: hidden; Removed to prevent dropdown clipping */
}

.api-code-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.api-code-title {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
  color: var(--text-muted);
}

.api-code-tabs {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.api-code-tab {
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 0;
  font-weight: 500;
  font-size: 13px;
  position: relative;
  transition: color 0.15s ease;
}

.api-code-tab:hover {
  color: var(--text-primary);
}

.api-code-tab.active {
  color: var(--color-primary);
  font-weight: 600;
}

.api-code-tab.active::after {
  content: '';
  position: absolute;
  bottom: -11px; /* Align precisely with the border-bottom */
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
}

.api-code-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.api-code-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.api-code-btn:hover {
  color: var(--text-primary);
  background: var(--code-inline-bg);
}

.api-code-btn svg {
  width: 14px;
  height: 14px;
}

.api-code-bodies {
  min-height: 100px;
}

.api-code-bodies pre {
  margin: 0 !important;
  padding: 16px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  font-family: 'Fira Code', monospace;
  font-size: 12px !important;
  line-height: 1.6 !important;
  box-shadow: none !important;
}

.api-code-bodies pre:last-child,
.api-code-section pre:last-child {
  border-bottom-left-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
}

.api-code-section pre {
  margin: 0 !important;
  padding: 16px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  font-family: 'Fira Code', monospace;
  font-size: 12px !important;
  line-height: 1.6 !important;
  box-shadow: none !important;
  color: var(--text-primary) !important;
}

/* Syntax Highlighting theme responsive styling */
:root, :root[data-theme="light"] {
  --code-syntax-key: #4338ca;      /* Indigo */
  --code-syntax-string: #0f766e;   /* Dark Teal */
  --code-syntax-number: #b45309;   /* Amber */
  --code-syntax-boolean: #0369a1;  /* Cyan */
  --code-syntax-comment: #64748b;  /* Muted grey */
  --code-syntax-keyword: #be185d;  /* Dark Pink */
}

:root[data-theme="dark"] {
  --code-syntax-key: #818cf8;      /* Indigo */
  --code-syntax-string: #fb7185;   /* Pink */
  --code-syntax-number: #f97316;   /* Orange */
  --code-syntax-boolean: #38bdf8;  /* Cyan */
  --code-syntax-comment: #94a3b8;  /* Muted slate */
  --code-syntax-keyword: #f472b6;  /* Light pink */
}

.api-code-panel .code-key { color: var(--code-syntax-key) !important; }
.api-code-panel .code-string { color: var(--code-syntax-string) !important; }
.api-code-panel .code-number { color: var(--code-syntax-number) !important; }
.api-code-panel .code-boolean { color: var(--code-syntax-boolean) !important; }
.api-code-panel .code-comment { color: var(--code-syntax-comment) !important; }
.api-code-panel .code-keyword { color: var(--code-syntax-keyword) !important; }

/* Responsive break for split layout */
@media (max-width: 1200px) {
  .api-container {
    grid-template-columns: 1fr;
  }
  .api-code-panel {
    position: static;
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--border-color);
  }
}

/* Language Dropdown Selector styling */
.api-lang-dropdown {
  position: relative;
  display: inline-block;
}

.api-lang-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.api-lang-btn:hover {
  border-color: var(--color-primary);
}

.api-lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  z-index: 100;
  min-width: 110px;
  padding: 4px 0;
}

.api-lang-menu.show {
  display: block;
}

.api-lang-option {
  padding: 6px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.api-lang-option:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.api-lang-option.active {
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

@media (max-width: 1600px) {
  .api-doc-flow {
    padding: 32px 32px 96px;
  }
}

/* ==========================================
   Pagination Navigation Visuals (Clean & Borderless)
   ========================================== */
.pagination-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  width: 100%;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary) !important;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
}

.pagination-link:hover {
  color: var(--color-primary) !important;
}

.pagination-link.prev {
  margin-right: auto;
}

.pagination-link.next {
  margin-left: auto;
}

.pagination-arrow-svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  vertical-align: middle;
}

.pagination-link.prev:hover .pagination-arrow-svg {
  transform: translateX(-3px);
}

.pagination-link.next:hover .pagination-arrow-svg {
  transform: translateX(3px);
}

.pagination-title {
  line-height: 1;
}

/* ==========================================
   API Try-It-Out Interactive Playground Console
   ========================================== */

.method-endpoint-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  width: 100%;
}

.method-endpoint-container .method-endpoint {
  margin-bottom: 0 !important;
  flex-grow: 1;
}

.api-try-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--color-success);
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
  flex-shrink: 0;
}

.api-try-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.api-try-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Playground Mode Switches */
.playground-mode .api-try-btn {
  display: none !important;
}

.playground-mode .api-doc-details {
  display: none !important;
}

.playground-mode .api-playground {
  display: block !important;
}

.playground-mode .playground-top-bar {
  display: flex !important;
}

.playground-mode .method-endpoint-container {
  display: none !important;
}

/* Playground Form Elements */
.playground-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 28px;
}

.pg-top-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pg-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 12px;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pg-back-btn:hover {
  background: var(--bg-surface);
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.pg-back-btn svg {
  width: 14px;
  height: 14px;
}

.pg-endpoint-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg-endpoint-badge .method-tag {
  font-size: 9px;
  padding: 3px 6px;
}

.pg-endpoint-badge .endpoint-url {
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  color: var(--text-primary);
}

.pg-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-success);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 7px 16px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.pg-send-btn:hover {
  opacity: 0.9;
}

.pg-send-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.playground-endpoint-selector {
  display: flex;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
}
.pg-ep-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.pg-ep-btn:hover {
  color: var(--text-primary);
}
.pg-ep-btn.active {
  background: var(--bg-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.playground-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-surface);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.playground-card-header {
  padding: 14px 20px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pg-card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pg-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.playground-card-body {
  padding: 20px;
}

.playground-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px dashed var(--border-color);
}

.playground-field:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.pg-field-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pg-field-name {
  font-family: 'Fira Code', monospace;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-primary);
}

.pg-field-type {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--code-inline-bg);
  border-radius: 4px;
  color: var(--text-muted);
  font-family: 'Fira Code', monospace;
}

.pg-field-req {
  font-size: 9px;
  padding: 2px 6px;
  background: var(--color-danger-soft);
  color: var(--color-danger);
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

.pg-field-desc {
  width: 100%;
  margin: 4px 0 0 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.pg-field-input-wrap {
  width: 100%;
  margin-top: 4px;
}

.pg-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  transition: all 0.15s ease;
}

.pg-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-soft);
}

.pg-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pg-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-soft);
}

.pg-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.pg-checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
}

/* ==========================================
   Playground Mock Response Status Card
   ========================================== */
.api-response-status-card {
  margin-bottom: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.api-response-status-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.api-response-status-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.api-response-status-badge.status-200 {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.api-response-status-badge.status-401,
.api-response-status-badge.status-404 {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.api-response-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.api-response-format {
  font-size: 11px;
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
  font-weight: 600;
}

.api-response-body-wrap {
  position: relative;
}

.api-response-body-wrap pre {
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: var(--code-bg) !important;
}

.api-response-body-wrap code {
  color: var(--code-text) !important;
}

/* Loading animation for Send button */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pg-send-btn.loading svg {
  animation: spin 0.8s linear infinite;
}

/* Custom File Input Playground Styles */
.pg-file-input-container {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.pg-file-input-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pg-file-input-btn:hover {
  background: var(--border-color);
  border-color: var(--text-muted);
}

.pg-file-input-label {
  font-size: 13.5px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-file-input-label.selected {
  color: var(--text-primary);
  font-weight: 500;
}

/* Sleek horizontal divider rule */
.markdown-body hr, .doc-body hr {
  height: 1px;
  padding: 0;
  margin: 32px 0;
  background-color: var(--border-color);
  border: 0;
  opacity: 0.6;
}





