/* Standalone Pay Vera Developer API Documentation Stylesheet - Image 3 Match */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* True Pitch Black OLED Dark Palette */
  --bg-docs: #000000;
  --bg-header: #000000;
  --bg-sidebar: #000000;
  --bg-card: #0a0a0a;
  --bg-surface-elevated: #121212;
  --bg-code: #161618;
  --border-color: #1f1f23;
  --border-subtle: #141416;
  
  --text-main: #ffffff;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-light: rgba(16, 185, 129, 0.12);
  
  --post-color: #10b981;
  --get-color: #3b82f6;
  --header-height: 64px;
  --sidebar-width: 280px;
}

[data-theme="light"] {
  --bg-docs: #f8fafc;
  --bg-header: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-code: #18181b;
  --border-color: #e2e8f0;
  --border-subtle: #e2e8f0;
  
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;

  --accent: #059669;
  --accent-hover: #047857;
  --accent-light: rgba(5, 150, 105, 0.1);
}

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

html, body {
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-docs);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Custom Sleek Scrollbar for Code Blocks, Tables & Sidebar */
::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.code-block,
.param-table-wrapper,
.docs-sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Backdrop Overlay for Mobile Sidebar */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* Header */
.docs-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-btn {
  display: none !important;
}

.docs-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-badge {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

.header-center {
  flex: 1;
  max-width: 480px;
  margin: 0 24px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-dim);
  font-size: 20px;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 9px 40px 9px 38px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

[data-theme="light"] .search-box input {
  background-color: #f1f5f9;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search-kbd {
  position: absolute;
  right: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

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

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Layout */
.docs-container {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  background-color: var(--bg-docs);
}

/* Left Sidebar - Permanent on Desktop */
.docs-sidebar {
  width: var(--sidebar-width);
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
  overflow-y: auto;
  z-index: 90;
  transform: none !important;
}

.sidebar-mobile-header {
  display: none;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
  padding: 0 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.nav-item:hover {
  color: var(--text-main);
  background-color: rgba(0, 0, 0, 0.05);
}
[data-theme="dark"] .nav-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Solid Emerald Active Sidebar Item (Matching Image 2) */
.nav-item.active {
  color: #ffffff !important;
  background-color: #059669 !important;
  font-weight: 700 !important;
  border: 1px solid #047857 !important;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.35);
}

.nav-item.active .material-symbols-outlined {
  color: #ffffff !important;
}

.nav-item .material-symbols-outlined {
  font-size: 18px;
}

.method-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}
.method-tag.post { background: rgba(16, 185, 129, 0.15); color: var(--post-color); }
.method-tag.get { background: rgba(59, 130, 246, 0.15); color: var(--get-color); }

/* Main Content Area */
.docs-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  width: calc(100% - var(--sidebar-width));
  min-width: 0;
  background-color: var(--bg-docs);
}

.docs-section {
  display: flex;
  gap: 40px;
  border-bottom: 1px solid var(--border-subtle);
  padding: 48px 36px;
  min-width: 0;
}

.section-left {
  flex: 1 1 50%;
  min-width: 0;
}

.section-right {
  flex: 1 1 50%;
  min-width: 0;
}

.section-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--text-main);
}

h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: var(--text-main);
}

h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 12px 0;
  color: var(--text-main);
}

p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  word-break: break-word;
}

p.lead {
  font-size: 16px;
  color: var(--text-muted);
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Inline Code Badges (Left column text badges) */
code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(16, 185, 129, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.2);
  word-break: break-all;
}

.url-pill {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-main);
  font-weight: 600;
  max-width: 100%;
  overflow-x: auto;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.feat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.feat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.feat-icon {
  color: var(--accent);
  font-size: 22px;
  margin-bottom: 8px;
}

.feat-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}

.feat-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Steps Timeline */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 24px 0;
}

.step-item {
  display: flex;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
}

.step-num {
  width: 32px;
  height: 32px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.step-content p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Info Cards */
.info-card {
  display: flex;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

.info-card-icon {
  color: var(--accent);
  font-size: 24px;
  flex-shrink: 0;
}

.info-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}

/* Parameter Tables */
.param-table-wrapper {
  margin: 16px 0 24px 0;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-card);
  max-width: 100%;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  min-width: 500px;
}

.param-table th {
  background: rgba(0, 0, 0, 0.03);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
  font-size: 11px;
  text-transform: uppercase;
}
[data-theme="dark"] .param-table th {
  background: rgba(255, 255, 255, 0.02);
}

.param-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
}

.param-table tr:last-child td {
  border-bottom: none;
}

.type-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #0284c7;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}
[data-theme="dark"] .type-tag {
  color: #38bdf8;
}

.req-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.req-tag.required { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.req-tag.optional { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

.endpoint-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  max-width: 100%;
  overflow-x: auto;
}

.endpoint-badge .method {
  font-weight: 800;
  font-size: 12px;
  font-family: var(--font-mono);
}
.endpoint-badge.post .method { color: var(--post-color); }
.endpoint-badge.get .method { color: var(--get-color); }
.endpoint-badge .path {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-main);
  font-weight: 600;
}

/* SLEEK CODE PLAYGROUND CARDS (Matching Image 3) */
.code-box {
  background: #18181b !important;
  border: 1px solid #27272a !important;
  border-radius: 10px !important;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
  max-width: 100%;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #202024 !important;
  border-bottom: 1px solid #27272a !important;
  padding: 10px 18px !important;
  flex-wrap: wrap;
  gap: 8px;
}

.code-title {
  font-size: 13px;
  font-weight: 600;
  color: #f4f4f5 !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.lang-tab {
  background: transparent;
  border: none;
  color: #a1a1aa !important;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.lang-tab:hover {
  color: #ffffff !important;
}
.lang-tab.active {
  background: #059669 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid #3f3f46 !important;
  color: #d4d4d8 !important;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.copy-btn:hover {
  color: #10b981 !important;
  border-color: #10b981 !important;
}

/* Reset inner code tags inside code-block so no green boxes appear! */
.code-block {
  padding: 20px 24px !important;
  font-family: var(--font-mono) !important;
  font-size: 13px !important;
  color: #34d399 !important;
  background: #18181b !important;
  overflow-x: auto;
  line-height: 1.6 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
}

.code-block code {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.code-block.json {
  color: #e4e4e7 !important;
}

.lang-pane {
  display: none;
}
.lang-pane.active {
  display: block;
}

/* Status Indicators */
.status-indicator {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}
.status-200 { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.status-402 { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

/* Footer */
.docs-footer {
  margin-left: var(--sidebar-width);
  border-top: 1px solid var(--border-color);
  padding: 28px 36px;
  background: var(--bg-header);
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

/* RESPONSIVE MEDIA QUERIES */

/* Large Tablets & Desktop Displays (<= 1280px) */
@media (max-width: 1280px) {
  .docs-section {
    flex-direction: column;
    gap: 24px;
    padding: 36px 24px;
  }
  .section-left, .section-right {
    max-width: 100%;
    width: 100%;
    padding-right: 0;
  }
}

/* Mobile & Small Tablets ONLY (<= 868px) */
@media (max-width: 868px) {
  /* Show Mobile Menu Button ONLY on Mobile Devices */
  .mobile-menu-btn {
    display: inline-flex !important;
  }
  
  .sidebar-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
  }

  .mobile-sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
  }

  /* Slide-out Mobile Drawer */
  .docs-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 300px !important;
    max-width: 85vw !important;
    background-color: var(--bg-card) !important;
    border-right: 1px solid var(--border-color) !important;
    padding: 20px 16px !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6) !important;
    z-index: 1000 !important;
    display: block !important;
  }

  .docs-sidebar.show {
    transform: translateX(0) !important;
  }

  .docs-content, .docs-footer {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .header-center {
    display: none;
  }

  .docs-header {
    padding: 0 14px;
  }

  .brand-badge {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .docs-section {
    padding: 28px 16px;
  }

  h1 {
    font-size: 24px;
  }
  h2 {
    font-size: 19px;
  }

  .desktop-only-btn {
    display: none !important;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}
