/* XPARO docs: small additions on top of the Furo theme. */

/* ---- sidebar: links back to xparo.in ---------------------------------- */
.xp-sidebar-links {
  margin: 1rem 0 0;
  padding: 0 var(--sidebar-item-spacing-horizontal);
  font-size: var(--sidebar-item-font-size);
}
.xp-sidebar-links .caption {
  margin: 0 0 0.25rem;
  color: var(--color-sidebar-caption-text);
  font-size: var(--sidebar-caption-font-size);
  font-weight: 700;
  text-transform: uppercase;
}
.xp-sidebar-links ul { list-style: none; margin: 0; padding: 0; }
.xp-sidebar-links li { margin: 0; }
.xp-sidebar-links a {
  display: block;
  padding: 0.3rem 0;
  color: var(--color-sidebar-link-text);
  text-decoration: none;
}
.xp-sidebar-links a:hover { color: var(--color-brand-primary); }

/* ---- the ad unit at the bottom of each page --------------------------- */
.xp-ad { margin: 3rem 0 1rem; min-height: 1px; }

/* ---- screenshots and diagrams ---------------------------------------- */
.xp-shot img,
img.xp-shot {
  border: 1px solid var(--color-background-border);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
figure.xp-shot figcaption,
figure.xp-diagram figcaption {
  color: var(--color-foreground-muted);
  font-size: 0.875em;
}
.xp-diagram img { background: #fff; border-radius: 10px; padding: 6px; }
body[data-theme="dark"] .xp-diagram img { background: #f4f4f5; }
@media (prefers-color-scheme: dark) {
  body:not([data-theme="light"]) .xp-diagram img { background: #f4f4f5; }
}

/* ---- "page at a glance" box at the top of dashboard pages -------------- */
.xp-glance {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1rem;
  margin: 1rem 0 1.5rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--color-background-border);
  border-left: 4px solid var(--color-brand-primary);
  border-radius: 8px;
  background: var(--color-background-secondary);
}
.xp-glance dt { font-weight: 700; margin: 0; }
.xp-glance dd { margin: 0; }
@media (max-width: 40em) {
  .xp-glance { grid-template-columns: 1fr; }
  .xp-glance dd { margin-bottom: 0.4rem; }
}

/* ---- interactive tools: command builder, table filter ------------------ */
.xp-tool {
  margin: 1.25rem 0 1.75rem;
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid var(--color-background-border);
  border-radius: 10px;
  background: var(--color-background-secondary);
}
.xp-tool h4 { margin: 0 0 0.75rem; font-size: 1rem; }
.xp-tool .xp-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem 1rem;
}
.xp-tool label { display: block; font-size: 0.85em; font-weight: 600; margin-bottom: 0.2rem; }
.xp-tool label small { font-weight: 400; color: var(--color-foreground-muted); }
.xp-tool input[type="text"],
.xp-tool input[type="search"],
.xp-tool select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--color-background-border);
  border-radius: 6px;
  background: var(--color-background-primary);
  color: var(--color-foreground-primary);
  font: inherit;
  font-size: 0.9em;
}
.xp-tool input:focus,
.xp-tool select:focus {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 1px;
}
.xp-tool .xp-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9em; }
.xp-tool .xp-out-label { margin: 1rem 0 0.25rem; font-size: 0.85em; font-weight: 600; }
.xp-tool pre.xp-out {
  margin: 0;
  padding: 0.75rem;
  overflow-x: auto;
  border-radius: 6px;
  background: var(--color-code-background);
  color: var(--color-code-foreground);
  font-size: 0.85em;
  white-space: pre;
}
.xp-tool .xp-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.xp-tool button.xp-copy {
  margin-top: 0.5rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--color-brand-primary);
  border-radius: 6px;
  background: transparent;
  color: var(--color-brand-primary);
  font: inherit;
  font-size: 0.85em;
  cursor: pointer;
}
.xp-tool button.xp-copy:hover { background: var(--color-brand-primary); color: var(--color-background-primary); }
.xp-tool .xp-note { margin: 0.6rem 0 0; font-size: 0.85em; color: var(--color-foreground-muted); }

/* table filter (added by xparo-docs.js above tables with class xp-filterable) */
.xp-filter { margin: 0.5rem 0 0.75rem; }
.xp-filter input {
  width: 100%;
  max-width: 28rem;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--color-background-border);
  border-radius: 6px;
  background: var(--color-background-primary);
  color: var(--color-foreground-primary);
  font: inherit;
}
.xp-filter .xp-filter-count { margin-left: 0.6rem; font-size: 0.85em; color: var(--color-foreground-muted); }
tr.xp-hidden { display: none; }

/* direction badges inside the message reference */
.xp-dir {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75em;
  font-weight: 700;
  white-space: nowrap;
}

/* keep wide reference tables scrollable on phones */
.table-wrapper { overflow-x: auto; }

/* step numbers on the quickstart */
.sd-card .sd-card-title { font-size: 1rem; }

/* smaller logo in the sidebar */
.sidebar-logo { max-width: 84px; }
.sidebar-brand { padding-bottom: 0.5rem; }

/* room for the site's bottom navbar (mounted by xparo-docs.js) */
body.xp-site-nav-on .bottom-of-page { padding-bottom: 72px; }
@media print { #xp-site-nav { display: none !important; } }
