/* demo/demo.css — AIBuild DEMO: dialog + the card that stays on screen (2026-11-22, local prototype). */
:root {
  --aib-demo-bg: rgba(255, 255, 255, 0.94);
  --aib-demo-fg: #1d2433;
  --aib-demo-muted: #5b6475;
  --aib-demo-line: rgba(29, 36, 51, 0.14);
  --aib-demo-accent: #4f46e5;
  --aib-demo-accent-fg: #ffffff;
  --aib-demo-warn: #b45309;
}
:root[data-theme="dark"], html.theme-dark, body.theme-dark {
  --aib-demo-bg: rgba(22, 26, 36, 0.94);
  --aib-demo-fg: #e8ecf5;
  --aib-demo-muted: #a4adbf;
  --aib-demo-line: rgba(232, 236, 245, 0.16);
  --aib-demo-accent: #818cf8;
  --aib-demo-accent-fg: #0f1220;
  --aib-demo-warn: #fbbf24;
}

.aib-demo-dialog {
  max-width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--aib-demo-line);
  border-radius: 16px;
  padding: 24px;
  background: var(--aib-demo-bg);
  color: var(--aib-demo-fg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  font: 15px/1.5 Inter, system-ui, sans-serif;
}
.aib-demo-dialog::backdrop { background: rgba(10, 12, 20, 0.45); }
.aib-demo-dialog h2 { margin: 0 0 10px; font-size: 19px; line-height: 1.3; }
.aib-demo-dialog p { margin: 0 0 10px; color: var(--aib-demo-muted); }

.aib-demo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.aib-demo-dialog button, .aib-demo-card button {
  font: inherit;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid var(--aib-demo-line);
  background: transparent;
  color: var(--aib-demo-fg);
  cursor: pointer;
}
.aib-demo-dialog button:disabled, .aib-demo-card button:disabled { opacity: 0.45; cursor: default; }
.aib-demo-dialog .aib-demo-primary, .aib-demo-card .aib-demo-primary {
  background: var(--aib-demo-accent);
  border-color: var(--aib-demo-accent);
  color: var(--aib-demo-accent-fg);
  font-weight: 600;
}

.aib-demo-card {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 2147483000;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--aib-demo-line);
  border-radius: 14px;
  background: var(--aib-demo-bg);
  color: var(--aib-demo-fg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  font: 13px/1.4 Inter, system-ui, sans-serif;
  backdrop-filter: blur(10px);
}
.aib-demo-card strong { color: var(--aib-demo-warn); grid-column: 1; }
.aib-demo-card .aib-demo-fold { grid-column: 2; grid-row: 1; padding: 0 6px; border: 0; }
.aib-demo-card .aib-demo-sub, .aib-demo-card .aib-demo-calc, .aib-demo-card .aib-demo-actions { grid-column: 1 / -1; }
.aib-demo-card .aib-demo-sub, .aib-demo-card .aib-demo-calc { color: var(--aib-demo-muted); }
.aib-demo-card .aib-demo-rooms { grid-column: 2; grid-row: 2; font-variant-numeric: tabular-nums; color: var(--aib-demo-muted); }
.aib-demo-card .aib-demo-calc:empty { display: none; }
.aib-demo-card .aib-demo-calc[data-state="error"], .aib-demo-card .aib-demo-calc[data-state="quota"] { color: var(--aib-demo-warn); }
.aib-demo-card .aib-demo-actions { margin-top: 8px; }
.aib-demo-card.folded .aib-demo-sub, .aib-demo-card.folded .aib-demo-calc, .aib-demo-card.folded .aib-demo-actions { display: none; }
.aib-demo-card.folded .aib-demo-fold { transform: rotate(180deg); }

/* not in the demo: the parcel template (cadastre = Pro) and routed networks */
html[data-demo="1"] [data-tpl="site"],
html[data-demo="1"] .splash-card[data-kind="site"] { display: none !important; }
html[data-demo="1"] [data-network-field="enabled"] { cursor: not-allowed; }

@media (max-width: 600px) {
  .aib-demo-card { left: 8px; right: 8px; bottom: 8px; max-width: none; }
}

/* the guided tour points at the panels: the demo card steps aside while it runs */
body:has(.g-tour) .aib-demo-card { display: none; }
