/* Agent docs layer on top of docs-shell.css. Same tokens, adds tables, status cards and sub navigation. */

/* WHY: the single docs page carried these rules inline; the multi-page docs share them here. */
body.odei-site-page .primary-sidebar__section--group.is-collapsed .primary-sidebar__group-body {
  display: none;
}
body.odei-site-page .primary-sidebar__section--group.is-collapsed .primary-sidebar__group-glyph {
  transform: rotate(-90deg);
}

@media (max-width: 880px) {
  body.odei-site-page #primary-sidebar-shell { display: none !important; }
  body.odei-site-page.mobile-nav-open #primary-sidebar-shell {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 160 !important;
    pointer-events: none !important;
  }
  body.odei-site-page:not(.mobile-nav-open) #primary-sidebar { display: none !important; }
  body.odei-site-page.mobile-nav-open #primary-sidebar {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    position: fixed !important;
    top: 74px !important;
    left: 10px !important;
    right: 10px !important;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important;
    max-height: calc(100svh - 84px - env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto !important;
    pointer-events: auto !important;
  }
  body.odei-site-page.mobile-nav-open #primary-sidebar .primary-nav-item {
    display: flex !important;
    width: 100% !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 44px !important;
    padding: 8px 9px !important;
    border: 1px solid rgba(96, 220, 210, 0.14) !important;
    text-decoration: none !important;
    color: rgba(224, 224, 224, 0.96) !important;
  }
  body.odei-site-page.mobile-nav-open #primary-sidebar .primary-sidebar__group-toggle {
    display: flex !important;
    width: 100% !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 7px 9px !important;
    border: 1px solid rgba(95, 214, 205, 0.18) !important;
    background: linear-gradient(160deg, rgba(10, 16, 24, 0.86), rgba(8, 12, 18, 0.82)) !important;
    color: rgba(224, 224, 224, 0.96) !important;
    cursor: pointer !important;
  }
  body.odei-site-page #mobile-nav-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 150 !important;
    opacity: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.86);
    transition: opacity 0.2s ease;
  }
  body.odei-site-page.mobile-nav-open #mobile-nav-backdrop { opacity: 1; pointer-events: auto; }
  .adoc-site .header .header-inner { flex-wrap: wrap; padding: 8px 12px; }
  .adoc-site .header .nav { display: none !important; }
  .adoc-site .mobile-nav-burger { display: flex !important; }
  .adoc-site .docs-container { width: calc(100% - 32px); }
}

.adoc-site .docs-container { grid-template-columns: minmax(0, 1fr); }
.adoc-site .docs-container > * { min-width: 0; }
.adoc-site .docs-panel { overflow: visible; }
/* WHY: the page nav wraps to two rows here, and a sticky nav would cover anchor targets. */
.adoc-site .docs-local-nav { position: static; }

.adoc-hero .docs-title { margin-top: 10px; margin-bottom: 16px; }
.adoc-hero .docs-lead { max-width: 76ch; }

.adoc-panel p,
.adoc-panel li {
  color: var(--docs-ink-dim);
  font-size: 15px;
  line-height: 1.62;
  max-width: 82ch;
}
.adoc-panel p { margin: 0 0 12px; }
.adoc-panel p strong,
.adoc-panel li strong { color: var(--docs-ink); }
.adoc-panel ul,
.adoc-panel ol { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 6px; }
.adoc-panel ul { list-style: disc; }
.adoc-panel ol { list-style: decimal; }
.adoc-panel li::marker { color: var(--docs-accent); }
.adoc-panel a { color: var(--docs-accent); text-underline-offset: 2px; }
.adoc-panel .docs-section-head { margin-bottom: 14px; }
.adoc-panel--note { padding: clamp(14px, 1.8vw, 20px); }
.adoc-panel--note .docs-callout { margin-top: 0; }
.adoc-panel--note p:last-child { margin-bottom: 0; }
.adoc-panel .docs-callout { font-size: 14px; max-width: 86ch; margin-bottom: 14px; }
.adoc-panel .docs-callout a { color: #fff3d5; }

.adoc-h3 {
  margin: 24px 0 10px;
  font-family: var(--docs-font-body);
  font-size: 19px;
  line-height: 1.25;
  color: #effffb;
  scroll-margin-top: var(--docs-anchor-offset);
}

.adoc-code {
  margin: 0 0 14px;
  border: 1px solid rgba(239, 248, 245, 0.08);
  border-radius: var(--docs-radius-sm);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.adoc-steps { counter-reset: none; }

.adoc-table-wrap {
  margin: 0 0 16px;
  overflow-x: auto;
  border: 1px solid rgba(239, 248, 245, 0.08);
  border-radius: var(--docs-radius-sm);
  background: rgba(3, 7, 6, 0.6);
}
.adoc-table-wrap:focus-visible { outline: 2px solid var(--docs-accent); outline-offset: 2px; }
.adoc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.5;
}
.adoc-table th {
  position: sticky;
  top: 0;
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--docs-ink-muted);
  background: rgba(8, 16, 14, 0.96);
  border-bottom: 1px solid var(--docs-border);
}
.adoc-table td {
  padding: 10px 12px;
  vertical-align: top;
  color: var(--docs-ink-dim);
  border-bottom: 1px solid var(--docs-border-soft);
  overflow-wrap: break-word;
  min-width: 90px;
}
.adoc-table tr:last-child td { border-bottom: 0; }
.adoc-table td:first-child { color: var(--docs-ink); }
.adoc-table a { color: var(--docs-accent); }
/* Only an address breaks anywhere; words and field names break at their own boundaries. */
.adoc-url { overflow-wrap: anywhere; }
.adoc-table-wrap--actions .adoc-table { min-width: 960px; }
.adoc-table-wrap--actions .adoc-table code { white-space: nowrap; }
.adoc-table-wrap--actions .adoc-table td:first-child { min-width: 170px; }
.adoc-table-wrap--actions .adoc-table td:nth-child(2) { min-width: 220px; }

/* Below 700px a table of three columns or more reads as one card per row; each value carries its column name. */
@media (max-width: 700px) {
  .adoc-table-wrap--stack { overflow-x: visible; border: 0; background: none; }
  .adoc-table-wrap--stack .adoc-table,
  .adoc-table-wrap--stack .adoc-table tbody { display: block; min-width: 0; }
  .adoc-table-wrap--stack .adoc-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .adoc-table-wrap--stack .adoc-table tr {
    display: block;
    margin: 0 0 10px;
    padding: 4px 0;
    border: 1px solid rgba(239, 248, 245, 0.08);
    border-radius: var(--docs-radius-sm);
    background: rgba(3, 7, 6, 0.6);
  }
  .adoc-table-wrap--stack .adoc-table tr:last-child { margin-bottom: 0; }
  .adoc-table-wrap--stack .adoc-table td {
    display: block;
    min-width: 0;
    padding: 6px 14px;
    border-bottom: 0;
  }
  .adoc-table-wrap--stack .adoc-table td:first-child { padding-top: 10px; font-weight: 600; }
  .adoc-table-wrap--stack .adoc-table td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--docs-ink-muted);
  }
  .adoc-table-wrap--stack.adoc-table-wrap--actions .adoc-table { min-width: 0; }
  .adoc-table-wrap--stack.adoc-table-wrap--actions .adoc-table code { white-space: normal; }
  .adoc-table-wrap--stack.adoc-table-wrap--actions .adoc-table td { min-width: 0; }
}

.adoc-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.adoc-badge--live { color: var(--docs-accent); border-color: rgba(116, 240, 218, 0.34); background: rgba(116, 240, 218, 0.08); }
.adoc-badge--updating { color: var(--docs-gold); border-color: rgba(243, 202, 119, 0.4); background: rgba(243, 202, 119, 0.09); }
.adoc-badge--preview { color: var(--docs-blue); border-color: rgba(153, 216, 255, 0.36); background: rgba(153, 216, 255, 0.08); }
.adoc-badge--not { color: var(--docs-danger); border-color: rgba(255, 142, 125, 0.4); background: rgba(255, 142, 125, 0.08); }
.adoc-badge--unconfirmed { color: var(--docs-coral); border-color: rgba(255, 179, 138, 0.4); background: rgba(255, 179, 138, 0.08); }

.adoc-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 12px;
  margin-top: 16px;
}
.adoc-status-card {
  padding: 14px 16px;
  border: 1px solid rgba(239, 248, 245, 0.08);
  border-radius: var(--docs-radius-sm);
  background: rgba(4, 9, 8, 0.66);
}
.adoc-status-card ul { margin: 8px 0 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.adoc-status-card li { color: var(--docs-ink-dim); font-size: 13.5px; line-height: 1.5; }
.adoc-status-card--live { border-color: rgba(116, 240, 218, 0.26); }
.adoc-status-card--updating { border-color: rgba(243, 202, 119, 0.32); }
.adoc-status-card--preview { border-color: rgba(153, 216, 255, 0.3); }
.adoc-status-card--not { border-color: rgba(255, 142, 125, 0.3); }

.adoc-checked { margin: 14px 0 0; font-size: 12.5px; color: var(--docs-ink-muted); }
.adoc-checked a { color: var(--docs-accent); }

.adoc-subnav { display: flex; flex-wrap: wrap; gap: 8px; }
.adoc-subnav-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(239, 248, 245, 0.08);
  border-radius: 999px;
  font-size: 13px;
  color: var(--docs-ink-dim);
  text-decoration: none;
  background: rgba(4, 9, 8, 0.66);
}
.adoc-subnav-link:hover,
.adoc-subnav-link.is-active { color: var(--docs-accent); border-color: rgba(116, 240, 218, 0.34); }

.adoc-desktop-banner { border-color: rgba(243, 202, 119, 0.34); }
.adoc-desktop-banner p { margin: 8px 0 0; color: var(--docs-ink-dim); font-size: 15px; line-height: 1.6; max-width: 84ch; }
.adoc-desktop-banner p strong { color: var(--docs-ink); }
.adoc-desktop-banner a { color: var(--docs-accent); }
