/* ============================================================================
   lightpane-demo.css — presentation layer for the LightPane customer-embed demos
   (ecommerce-app-status, s3-acme-controls). These pages simulate a CUSTOMER
   embedding LightPane panes in their own branded tooling, so they deliberately
   look different from lightpane.io — but they are built on lightpane.io's tested
   CSS base (tokens.css + chrome.css + sd-embed.css), NOT on the legacy Bootstrap/
   clouds-and-light theme, whose broad element rules collided with the pane CSS.

   This file owns the demo-specific look:
     1. a BLUE accent scheme (overriding the sunlit-amber tokens),
     2. demo typography,
     3. the demo layout: header, left scrollspy sidebar, content column, sections,
     4. prose / table / card / tag styling drawn from the pane tokens.
   Panes render themselves via sd-embed.css and are left untouched.
   ============================================================================ */

/* ── 1. Blue scheme — override the accent tokens on the demo root ───────────── */
body.lp-demo {
  /* Sunlit amber -> a calm corporate blue. The base tokens.css keeps ink/paper/
     line neutrals; we only re-point the accent so the whole surface reads blue. */
  --lp-amber:      #2563eb;   /* primary accent (was #f5c518) */
  --lp-amber-soft: #bfd3fb;
  --lp-amber-wash: #eff4fe;
  --lp-ink-on-accent: #ffffff;

  /* Demo-local tokens */
  --demo-accent:      #2563eb;
  --demo-accent-dark: #1d4ed8;
  --demo-accent-ink:  #1e3a8a;
  --demo-header-bg:   #0b1f4d;   /* deep navy header bar */
  --demo-header-ink:  #eaf0fb;
  --demo-sidebar-bg:  #f6f8fc;
  --demo-line:        #e2e8f0;
  --demo-ink:         #1e293b;
  --demo-ink-2:       #475569;
  --demo-ink-3:       #64748b;
  --demo-paper:       #ffffff;
  --demo-canvas:      #f8fafc;
  --demo-radius:      10px;

  --demo-font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --demo-font-head: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

/* ── 2. Page base ──────────────────────────────────────────────────────────── */
body.lp-demo {
  margin: 0;
  font-family: var(--demo-font-sans);
  color: var(--demo-ink);
  background: var(--demo-canvas);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.lp-demo *, body.lp-demo *::before, body.lp-demo *::after { box-sizing: border-box; }

/* ── 3. Header bar (the customer's own product chrome) ─────────────────────── */
/* Fallback values make the header self-contained — it can be reused on a page
   that does NOT carry `body.lp-demo` (e.g. the s3-acme document page, which keeps
   its own content CSS and only borrows this chrome). */
.lp-demo-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px; height: 56px;
  background: var(--demo-header-bg, #0b1f4d); color: var(--demo-header-ink, #eaf0fb);
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-family: var(--demo-font-sans, 'Inter', ui-sans-serif, system-ui, sans-serif);
}
.lp-demo-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; letter-spacing: .01em; }
.lp-demo-brand .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--demo-accent, #2563eb); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; }
.lp-demo-header .sub { color: #9db4e6; font-weight: 500; font-size: 13px; }
.lp-demo-header .spacer { flex: 1 1 auto; }
.lp-demo-header .who { font-size: 13px; color: #b9c8ea; }

/* Data-source toggle (Live vs Demo) — a segmented pill in the header. */
.lp-demo-datatoggle { display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; }
.lp-demo-datatoggle a { font-size: 12.5px; font-weight: 600; line-height: 1; text-decoration: none;
  color: #b9c8ea; padding: 5px 14px; border-radius: 999px; }
.lp-demo-datatoggle a:hover { color: #fff; }
.lp-demo-datatoggle a.is-active { background: var(--demo-accent, #2563eb); color: #fff; }

/* ── 4. Shell: sidebar + content ───────────────────────────────────────────── */
.lp-demo-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .lp-demo-shell { grid-template-columns: 1fr; } }

.lp-demo-side {
  position: sticky; top: 56px; align-self: start;
  height: calc(100vh - 56px); overflow-y: auto;
  background: var(--demo-sidebar-bg); border-right: 1px solid var(--demo-line);
  padding: 22px 16px;
}
@media (max-width: 900px) { .lp-demo-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--demo-line); } }
.lp-demo-side .toc-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--demo-ink-3); margin: 0 8px 10px; }
.lp-demo-toc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.lp-demo-toc a {
  display: block; padding: 7px 10px; border-radius: 8px;
  color: var(--demo-ink-2); text-decoration: none; font-size: 13.5px; line-height: 1.35;
  border-left: 2px solid transparent;
}
.lp-demo-toc a:hover { background: #eef3fc; color: var(--demo-ink); }
.lp-demo-toc a.is-active { background: #e6eefc; color: var(--demo-accent-ink); font-weight: 600; border-left-color: var(--demo-accent); }
.lp-demo-toc .sub a { padding-left: 22px; font-size: 12.5px; color: var(--demo-ink-3); }

.lp-demo-main { padding: 34px 40px 80px; max-width: 1040px; }
@media (max-width: 640px) { .lp-demo-main { padding: 22px 18px 60px; } }

/* ── 5. Content: headings, prose, sections ─────────────────────────────────── */
.lp-demo-main h1 { font-family: var(--demo-font-head); font-size: 30px; font-weight: 700; line-height: 1.2; margin: 0 0 6px; color: var(--demo-ink); }
.lp-demo-main .lede { font-size: 16px; color: var(--demo-ink-2); margin: 0 0 26px; max-width: 68ch; }
.lp-demo-section { padding: 26px 0; border-top: 1px solid var(--demo-line); scroll-margin-top: 72px; }
.lp-demo-section:first-of-type { border-top: 0; }
.lp-demo-section h2 { font-family: var(--demo-font-head); font-size: 20px; font-weight: 700; margin: 0 0 4px; color: var(--demo-ink); }
.lp-demo-section h3 { font-size: 15px; font-weight: 600; margin: 20px 0 8px; color: var(--demo-ink); }
.lp-demo-main p { margin: 0 0 12px; color: var(--demo-ink-2); }
.lp-demo-main a { color: var(--demo-accent-dark); }
.lp-demo-main code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; background: #eef2f8; padding: 1px 5px; border-radius: 5px; color: #334155; }
.lp-demo-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--demo-accent); margin: 0 0 6px; }

/* ── 6. Cards / profile grid / static tables (non-pane content) ────────────── */
.lp-demo-cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 8px 0 18px; }
.lp-demo-card { background: var(--demo-paper); border: 1px solid var(--demo-line); border-radius: var(--demo-radius); padding: 14px 16px; }
.lp-demo-card .k { font-size: 12px; color: var(--demo-ink-3); }
.lp-demo-card .v { font-size: 15px; font-weight: 600; color: var(--demo-ink); }
.lp-demo-table { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: 13.5px; }
.lp-demo-table th, .lp-demo-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--demo-line); }
.lp-demo-table th { color: var(--demo-ink-3); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }

/* ── 7. Tags / status chips (customer's own, distinct from pane pills) ──────── */
.lp-demo-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--demo-accent-wash, #eff4fe); color: var(--demo-accent-ink); border: 1px solid #cfe0fb; }
.lp-demo-tag.aws    { background: #fff4e6; color: #9a5b00; border-color: #f6d9ac; }
.lp-demo-tag.azure  { background: #e9f1ff; color: #1f4b99; border-color: #c6dbff; }
.lp-demo-tag.gcp    { background: #eaf6ee; color: #1a7a3f; border-color: #c3e6cf; }
.lp-demo-tag.onprem { background: #f1f0ee; color: #57534e; border-color: #ddd8cf; }
.lp-demo-alert { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--demo-radius); background: #fef2f2; border: 1px solid #fca5a5; color: #7a1a1a; font-size: 14px; font-weight: 600; margin: 12px 0 18px; }

/* ── 8. Pane wrapper — generous breathing room around every embedded pane, and
   (via margin-collapse) around the explanatory text between panes: ~1.5 text
   rows top & bottom (row ≈ 24px → 36px). ───────────────────────────────────── */
.lp-demo-pane { margin: 36px 0; }
/* Keep intro text tight to the heading it follows, but well clear of panes. */
.lp-demo-section > h3 { margin-top: 34px; }
.lp-demo-section > h3 + p { margin-bottom: 18px; }
