/* Project-specific overrides on top of AdminLTE / Bootstrap 5.
   Everything here is bespoke UX with no equivalent in the framework. */

/* Dark code block used in manifest, preview, social-example, etc. */
.code-block {
  background: #1d1d1f;
  color: #f0f0f0;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow: auto;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  max-height: 500px;
  white-space: pre;
}

/* Placeholder reference list in template editor — tighter than Bootstrap default. */
.placeholder-list code {
  font-size: 0.75rem;
}

/* Template picker — inline SVG wireframes next to the radio label. */
.template-option:has(.template-mode:checked) {
  border-color: var(--bs-primary) !important;
  background: var(--bs-primary-bg-subtle);
}
.template-preview {
  display: inline-block;
  width: 160px;
  line-height: 0;
}
.template-preview svg {
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #fff;
}

/* ───────── Customer edit page ─────────
   Vertical nav-pills on the left, panels on the right. */

/* Sticky left nav-pills column. */
.edit-nav-wrapper { position: sticky; top: 1rem; align-self: flex-start; }

/* Floated help diagram next to a panel's form fields. */
.help-diagram {
  float: right;
  width: 220px;
  margin: 0 0 1rem 1rem;
  line-height: 0;
}
.help-diagram img {
  width: 100%; height: auto;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--bs-border-color);
}
.help-diagram-caption {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  text-align: center;
  margin-top: 0.25rem;
  line-height: 1.3;
}
@media (max-width: 767px) {
  .help-diagram { float: none; width: 100%; max-width: 320px; margin: 0 auto 1rem; }
}

/* Side-by-side diagram pair (image embed mode shows URL + CID together). */
.help-diagram-pair { display: flex; gap: 0.5rem; clear: both; margin-bottom: 1rem; }
.help-diagram-pair .help-diagram { float: none; width: 50%; margin: 0; }

/* Field-styles table — highlight rows that have an override. */
.field-style-row--active td { background: var(--bs-primary-bg-subtle); }

/* Sticky bottom action bar so Save is always reachable inside long panels. */
.edit-actions {
  position: sticky;
  bottom: 0;
  background: var(--bs-body-bg);
  padding: 0.75rem 0;
  margin-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
  z-index: 10;
}

/* Version label pinned to the bottom of the sidebar (links to changelog). */
.app-sidebar { display: flex; flex-direction: column; }
.sidebar-footer { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.sidebar-footer a:hover { opacity: 1 !important; }

/* Changelog page — readable spacing for the rendered Markdown. */
.changelog-body h2 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--bs-border-color);
}
.changelog-body h2:first-child { margin-top: 0; }
.changelog-body h3 { font-size: 1rem; margin-top: 1rem; color: var(--bs-secondary-color); }
.changelog-body ul { margin-bottom: 1rem; }
.changelog-body li { margin-bottom: 0.25rem; }
