/* ── BAMS API Docs Plugin Styles ────────────────────────────────
   All selectors scoped to .bams-docs-wrap to avoid theme conflicts.
   ─────────────────────────────────────────────────────────────── */

.bams-docs-wrap {
  --bd-navy:      #1a2f6b;
  --bd-navy-dark: #122056;
  --bd-blue:      #0693e3;
  --bd-blue-dark: #0578c5;
  --bd-bg:        #f5f7fa;
  --bd-dark:      #1a1a2e;
  --bd-gray:      #6b7a99;
  --bd-border:    #e4e9f2;
  --bd-white:     #ffffff;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--bd-dark);
  background: var(--bd-bg);
}
.bams-docs-wrap *, .bams-docs-wrap *::before, .bams-docs-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Two-column layout ── */
.bams-docs-wrap .bd-layout {
  display: flex;
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Sidebar ── */
.bams-docs-wrap .bd-sidebar {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--bd-border);
  background: var(--bd-white);
}
.bams-docs-wrap .bd-sidebar-inner {
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  padding: 24px 0 40px;
}
.bams-docs-wrap .bd-nav-group { margin-bottom: 24px; }
.bams-docs-wrap .bd-nav-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--bd-navy);
  padding: 0 20px 8px;
}
.bams-docs-wrap .bd-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 6px 20px;
  font-size: 13.5px;
  color: var(--bd-dark);
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
  font-family: inherit;
  text-decoration: none;
}
.bams-docs-wrap .bd-nav-item:hover { background: rgba(6,147,227,0.06); color: var(--bd-blue); }
.bams-docs-wrap .bd-nav-item--active {
  color: var(--bd-blue);
  font-weight: 700;
  border-left-color: var(--bd-blue);
  background: rgba(6,147,227,0.07);
}

/* ── Main content ── */
.bams-docs-wrap .bd-main {
  flex: 1;
  min-width: 0;
  background: var(--bd-white);
}
.bams-docs-wrap .bd-content {
  max-width: 800px;
  padding: 40px 48px 80px;
}
.bams-docs-wrap .bd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--bd-gray);
  margin-bottom: 16px;
}
.bams-docs-wrap .bd-breadcrumb-sep { color: var(--bd-border); }
.bams-docs-wrap .bd-breadcrumb-current { color: var(--bd-navy); font-weight: 500; }
.bams-docs-wrap .bd-page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--bd-navy);
  letter-spacing: -0.4px;
  margin-bottom: 16px;
  line-height: 1.2;
}
.bams-docs-wrap .bd-page-intro {
  font-size: 16px;
  color: var(--bd-gray);
  line-height: 1.7;
  margin-bottom: 8px;
}
.bams-docs-wrap .bd-last-updated {
  font-size: 12px;
  color: #a0aec0;
  margin-bottom: 48px;
}

/* ── Sections ── */
.bams-docs-wrap .bd-section {
  margin-bottom: 56px;
  scroll-margin-top: 80px;
}
.bams-docs-wrap .bd-section-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--bd-navy);
  letter-spacing: 0;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bd-border);
}
.bams-docs-wrap .bd-section p {
  font-size: 14.5px;
  color: #374151;
  line-height: 1.75;
  margin-bottom: 16px;
}
.bams-docs-wrap .bd-section code {
  background: #eaf5fd;
  color: var(--bd-blue);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
}
.bams-docs-wrap .bd-h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--bd-dark);
  margin: 24px 0 12px;
}

/* ── Code blocks ── */
.bams-docs-wrap .bd-code-block {
  background: #0f172a;
  border-radius: 8px;
  overflow: hidden;
  margin: 16px 0 24px;
}
.bams-docs-wrap .bd-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.bams-docs-wrap .bd-code-lang {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-family: 'SF Mono', Consolas, monospace;
}
.bams-docs-wrap .bd-code-copy {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 3px;
  padding: 2px 8px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.bams-docs-wrap .bd-code-copy:hover { color: #fff; border-color: rgba(255,255,255,0.5); }
.bams-docs-wrap .bd-code-pre {
  padding: 20px;
  margin: 0;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
  color: #e2e8f0;
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  white-space: pre;
}

/* ── Tables ── */
.bams-docs-wrap .bd-table-wrapper {
  overflow-x: auto;
  margin: 12px 0 24px;
  border-radius: 8px;
  border: 1px solid var(--bd-border);
}
.bams-docs-wrap .bd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.bams-docs-wrap .bd-table thead { background: #f8fafc; }
.bams-docs-wrap .bd-table th {
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--bd-dark);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--bd-border);
}
.bams-docs-wrap .bd-table td {
  padding: 10px 16px;
  color: #374151;
  border-bottom: 1px solid #f1f5f9;
}
.bams-docs-wrap .bd-table tbody tr:last-child td { border-bottom: none; }
.bams-docs-wrap .bd-table code {
  background: #eaf5fd;
  color: var(--bd-blue);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'SF Mono', Consolas, monospace;
}

/* ── Badges ── */
.bams-docs-wrap .bd-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.bams-docs-wrap .bd-badge--required { background: #fee2e2; color: #b91c1c; }
.bams-docs-wrap .bd-badge--optional { background: #f0fdf4; color: #15803d; }

/* ── Callouts ── */
.bams-docs-wrap .bd-callout {
  padding: 14px 16px;
  border-radius: 6px;
  font-size: 13.5px;
  line-height: 1.6;
  margin: 16px 0;
}
.bams-docs-wrap .bd-callout a { color: inherit; font-weight: 600; }
.bams-docs-wrap .bd-callout--info {
  background: #eaf5fd;
  border-left: 4px solid var(--bd-blue);
  color: #0566a8;
}
.bams-docs-wrap .bd-callout--warning {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

/* ── Section dividers ── */
.bams-docs-wrap .bd-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 48px 0 32px;
}
.bams-docs-wrap .bd-divider span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--bd-gray);
  white-space: nowrap;
}
.bams-docs-wrap .bd-divider::before,
.bams-docs-wrap .bd-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bd-border);
}

/* ── Status flow ── */
.bams-docs-wrap .bd-status-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 24px;
}
.bams-docs-wrap .bd-status-flow-item { display: flex; align-items: center; gap: 8px; }
.bams-docs-wrap .bd-status-pill {
  background: #eaf5fd;
  color: var(--bd-blue);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #b3ddf7;
}
.bams-docs-wrap .bd-status-arrow { color: var(--bd-gray); font-size: 14px; }

/* ── SDK grid ── */
.bams-docs-wrap .bd-sdk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.bams-docs-wrap .bd-sdk-card {
  background: var(--bd-bg);
  border: 1px solid var(--bd-border);
  border-radius: 8px;
  padding: 14px 16px;
}
.bams-docs-wrap .bd-sdk-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--bd-dark);
  margin-bottom: 6px;
}
.bams-docs-wrap .bd-sdk-pkg {
  font-size: 11.5px;
  color: var(--bd-gray);
  font-family: 'SF Mono', Consolas, monospace;
  word-break: break-all;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .bams-docs-wrap .bd-sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100vh;
    z-index: 90;
    transition: left 0.25s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  }
  .bams-docs-wrap .bd-sidebar--open { left: 0; }
  .bams-docs-wrap .bd-content { padding: 32px 20px 60px; }
}
