/* HeltAIum — Live-Demo (/de|en|hu/demo/)
   Builds on landing.css (tokens, nav, hero, footer). The chat/voice windows reuse
   the .dm-* component language of the #demo section on the main page. */

/* ── layout ─────────────────────────────────────────────────────────── */
.ld-stage {
  padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(64px, 9vw, 120px);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.ld-grid {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 760px) minmax(260px, 1fr);
  gap: clamp(28px, 4vw, 56px); align-items: start; justify-content: center;
}
@media (max-width: 1080px) { .ld-grid { grid-template-columns: minmax(0, 1fr); max-width: 760px; } }

.ld-main { min-width: 0; display: flex; flex-direction: column; align-items: stretch; }

/* tabs (same look as main-page .demo-tabs, normal cursor here) */
.demo-tabs {
  display: flex; gap: 4px; margin: 0 0 18px; padding: 4px;
  background: var(--bg-deep); border: 1px solid var(--rule); border-radius: 999px;
}
.demo-tab {
  flex: 1; font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-dim); padding: 12px 18px; border: none; background: transparent; border-radius: 999px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: color .3s, background .3s; min-height: 44px;
}
.demo-tab .tab-num { color: var(--ink-dim); font-size: 10px; }
.demo-tab:hover { color: var(--ink-mute); }
.demo-tab[aria-selected="true"] { background: rgba(47,139,255,.12); color: var(--accent-hot); box-shadow: inset 0 0 0 1px rgba(124,200,255,.25); }
.demo-tab[aria-selected="true"] .tab-num { color: var(--accent-hot); opacity: .7; }
.demo-panel[hidden], .dm-window [hidden] { display: none !important; }
.demo-panel { animation: ld-fade .4s var(--ease-out); }
@keyframes ld-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── window chrome (copied from the main page .dm-*) ─────────────────── */
.dm-window {
  width: 100%; border-radius: 18px; overflow: hidden; position: relative;
  background: linear-gradient(180deg, rgba(14,22,42,.92), rgba(6,10,20,.96));
  border: 1px solid rgba(124,200,255,.18);
  box-shadow: 0 0 0 1px rgba(124,200,255,.04) inset, 0 30px 80px -30px rgba(0,0,0,.8), 0 0 70px -30px rgba(47,139,255,.55);
}
.dm-window::before {
  content: ''; position: absolute; left: 10%; right: 10%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,200,255,.9), transparent);
}
.dm-bar { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--rule); background: rgba(10,15,28,.6); }
.dm-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; position: relative; display: grid; place-items: center;
  background: radial-gradient(circle at 65% 30%, #9bd6ff 0 6%, #2f8bff 30%, #0b2c63 75%);
  box-shadow: 0 0 0 1px rgba(124,200,255,.5), 0 0 22px -4px rgba(47,139,255,.8);
}
.dm-avatar svg { width: 20px; height: 20px; display: block; }
.dm-avatar::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #38d39f; box-shadow: 0 0 0 2px #0a0f1c; }
.dm-window[data-state="off"] .dm-bar .dm-avatar::after { background: var(--ink-dim); }
.dm-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dm-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #67d7ab; }
.dm-window[data-state="off"] .dm-sub { color: var(--ink-dim); }
.dm-chip-ai { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-hot); border: 1px solid rgba(124,200,255,.35); border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.dm-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--rule); font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--ink-dim); }
.dm-foot b { color: var(--ink-mute); font-weight: 500; }

/* chat stream */
.dm-stream { height: clamp(360px, 52vh, 520px); overflow-y: auto; padding: 24px 20px 12px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }
.dm-row { display: flex; gap: 10px; align-items: flex-end; opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }
.dm-row.in { opacity: 1; transform: none; }
.dm-row.user { justify-content: flex-end; }
.dm-row .dm-avatar { width: 28px; height: 28px; }
.dm-row .dm-avatar::after { display: none; }
.dm-row .dm-avatar svg { width: 14px; height: 14px; }
.dm-bubble { max-width: min(80%, 540px); padding: 12px 16px; border-radius: 16px; font-size: 15px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.dm-row.bot .dm-bubble { background: rgba(20,30,54,.85); border: 1px solid rgba(124,200,255,.14); border-bottom-left-radius: 5px; }
.dm-row.user .dm-bubble { background: var(--accent-fill); color: #fff; border-bottom-right-radius: 5px; box-shadow: 0 8px 24px -12px rgba(47,139,255,.9); }
.dm-row.sys .dm-bubble { background: transparent; border: 1px dashed rgba(124,200,255,.3); color: var(--ink-mute); font-size: 14px; max-width: 100%; white-space: normal; }
.dm-row.sys.warn .dm-bubble { border-color: rgba(242,194,123,.45); color: #f5d9ad; }
.dm-bubble strong { color: var(--accent-hot); font-weight: 600; }
.dm-bubble a { color: var(--accent-hot); text-decoration: underline; text-underline-offset: 3px; }
.dm-bubble a:hover { color: #fff; }
.dm-bubble .dm-caret { display: inline-block; width: 7px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--accent-hot); animation: dm-blink .9s steps(2) infinite; }
@keyframes dm-blink { 50% { opacity: 0; } }
.dm-typing { display: inline-flex; gap: 5px; padding: 4px 0; }
.dm-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-hot); opacity: .35; animation: dm-dot 1.1s infinite ease-in-out; }
.dm-typing i:nth-child(2) { animation-delay: .15s; } .dm-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dm-dot { 30% { opacity: 1; transform: translateY(-3px); } 60% { opacity: .35; transform: none; } }

.dm-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 20px 12px; }
.dm-chip {
  font: 500 13px/1.2 var(--font-sans); color: var(--ink); cursor: pointer; padding: 10px 14px; border-radius: 999px; min-height: 40px;
  background: rgba(47,139,255,.08); border: 1px solid rgba(124,200,255,.35);
  transition: background .25s, border-color .25s, box-shadow .25s, transform .25s;
}
.dm-chip:hover { background: rgba(47,139,255,.18); border-color: rgba(124,200,255,.8); box-shadow: 0 0 18px -6px rgba(47,139,255,.8); transform: translateY(-1px); }
.dm-chip:disabled { opacity: .35; cursor: default; transform: none; }

/* composer */
.dm-composer { display: flex; gap: 10px; align-items: flex-end; padding: 12px 16px 14px; border-top: 1px solid var(--rule); background: rgba(6,10,20,.55); }
.dm-input {
  flex: 1; min-width: 0; resize: none; min-height: 46px; max-height: 160px;
  font: 400 15px/1.45 var(--font-sans); color: var(--ink);
  background: rgba(10,15,28,.8); border: 1px solid rgba(190,205,228,.22); border-radius: 14px; padding: 12px 14px;
  transition: border-color .25s, box-shadow .25s;
}
.dm-input::placeholder { color: var(--ink-dim); }
.dm-input:focus { outline: none; border-color: rgba(124,200,255,.75); box-shadow: 0 0 0 3px rgba(47,139,255,.18); }
.dm-input:disabled { opacity: .5; }
.dm-send {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer; display: grid; place-items: center;
  background: var(--accent-fill); color: #fff; box-shadow: 0 0 0 1px rgba(124,200,255,.4), 0 10px 26px -10px rgba(47,139,255,.9);
  transition: filter .25s, opacity .25s;
}
.dm-send svg { width: 18px; height: 18px; }
.dm-send:hover { filter: brightness(1.1); }
.dm-send:disabled { opacity: .4; cursor: default; filter: none; }
.dm-count { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; color: var(--ink-dim); padding: 0 20px 10px; text-align: right; min-height: 1.2em; }
.dm-count.over { color: #f5a97f; }

/* buttons */
.dm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; min-height: 44px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); background: rgba(10,15,28,.5); border: 1px solid rgba(190,205,228,.28);
  padding: 10px 18px; border-radius: 999px; transition: border-color .25s, box-shadow .25s, color .25s, filter .25s, opacity .25s;
}
.dm-btn:hover { border-color: rgba(124,200,255,.8); box-shadow: 0 0 18px -6px rgba(47,139,255,.8); color: #fff; }
.dm-btn.primary { background: var(--accent-fill); color: #fff; border-color: transparent; box-shadow: 0 0 0 1px rgba(124,200,255,.4), 0 10px 26px -10px rgba(47,139,255,.9); }
.dm-btn.primary:hover { filter: brightness(1.08); }
.dm-btn.danger { background: linear-gradient(180deg, #d9455f, #b3263f); color: #fff; border-color: transparent; box-shadow: 0 10px 26px -12px rgba(217,69,95,.9); }
.dm-btn.big { font-size: 12px; padding: 14px 26px; min-height: 52px; }
.dm-btn:disabled { opacity: .45; cursor: default; box-shadow: none; filter: none; }
.dm-btn[hidden] { display: none !important; }

/* consent card (sits inside the window before first use) */
.ld-consent {
  margin: 20px; padding: 22px 22px 20px; border-radius: 14px;
  background: rgba(10,15,28,.75); border: 1px solid rgba(124,200,255,.22);
  display: flex; flex-direction: column; gap: 14px;
}
.ld-consent h3 { font-family: var(--font-display); font-weight: 500; font-size: 18px; letter-spacing: -.01em; color: var(--ink); }
.ld-consent p, .ld-consent li { font-size: 14px; line-height: 1.55; color: var(--ink-mute); }
.ld-consent ul { padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.ld-consent a { color: var(--accent-hot); text-decoration: underline; text-underline-offset: 3px; }
.ld-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--ink); cursor: pointer; }
.ld-check input { width: 20px; height: 20px; margin-top: 1px; accent-color: #2f8bff; flex: none; cursor: pointer; }
.ld-consent .dm-btn { align-self: flex-start; }
.ld-ts { min-height: 0; }
.ld-ts:empty { display: none; }

/* notices */
.ld-note {
  margin: 0 20px 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5;
  border: 1px solid rgba(124,200,255,.25); background: rgba(47,139,255,.06); color: var(--ink-mute);
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center;
}
.ld-note.warn { border-color: rgba(242,194,123,.4); background: rgba(242,194,123,.06); color: #f5d9ad; }
.ld-note.err { border-color: rgba(245,130,130,.4); background: rgba(245,130,130,.06); color: #f7c0c0; }
.ld-note a.dm-btn { font-size: 10px; min-height: 38px; padding: 8px 14px; }
.ld-note[hidden] { display: none; }

/* voice call screen */
.dm-call { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.dm-call-left { padding: 28px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; border-right: 1px solid var(--rule); text-align: center; }
.dm-orb { width: min(240px, 64vw); aspect-ratio: 1; display: block; }
.dm-timer { font-family: var(--font-mono); font-size: 28px; letter-spacing: .06em; color: var(--ink); font-variant-numeric: tabular-nums; }
.dm-timer small { font-size: 14px; color: var(--ink-dim); }
.dm-timer.near { color: #f5d9ad; }
.dm-state { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); min-height: 1.4em; }
.dm-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-dim); }
.dm-state.live { color: #67d7ab; } .dm-state.live::before { background: #38d39f; box-shadow: 0 0 10px #38d39f; }
.dm-state.busy::before { background: var(--accent-hot); animation: dm-dot 1.1s infinite ease-in-out; }
.dm-state.err { color: #f7c0c0; } .dm-state.err::before { background: #f58282; }
.dm-controls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.dm-transcript { padding: 22px 20px; height: clamp(360px, 52vh, 480px); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.dm-transcript .ld-empty { color: var(--ink-dim); font-size: 14px; line-height: 1.6; margin: auto 0; text-align: center; padding: 0 12px; }
.dm-turn { display: grid; grid-template-columns: 64px 1fr; gap: 10px; opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }
.dm-turn.in { opacity: 1; transform: none; }
.dm-turn .who { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); padding-top: 4px; }
.dm-turn.bot .who { color: var(--accent-hot); }
.dm-turn .txt { font-size: 15px; line-height: 1.55; color: var(--ink-mute); padding-left: 12px; border-left: 2px solid var(--rule-mid); overflow-wrap: anywhere; }
.dm-turn.bot .txt { color: var(--ink); }
.dm-voice .ld-consent { margin: 20px; }
@media (max-width: 760px) {
  .dm-call { grid-template-columns: 1fr; }
  .dm-call-left { border-right: none; border-bottom: 1px solid var(--rule); }
  .dm-orb { width: 170px; }
  .dm-stream { height: 420px; }
  .dm-transcript { height: 280px; }
  .dm-bubble { max-width: 88%; font-size: 14.5px; }
  .dm-bar { padding: 14px 16px; gap: 12px; }
  .dm-chip-ai { display: none; }
  .ld-consent, .dm-voice .ld-consent { margin: 14px; padding: 18px 16px; }
}

/* side panel */
.ld-aside { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 96px; }
@media (max-width: 1080px) { .ld-aside { position: static; } }
.ld-card { border: 1px solid var(--rule-mid); border-radius: 14px; padding: 20px; background: rgba(10,15,28,.45); }
.ld-card h3 { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 14px; }
.ld-card ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ld-card li { font-size: 14px; line-height: 1.5; color: var(--ink-mute); display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
.ld-card li::before { content: '→'; color: var(--accent-hot); font-family: var(--font-display); }
.ld-card li b { color: var(--ink); font-weight: 600; }
.ld-card p { font-size: 14px; line-height: 1.55; color: var(--ink-mute); }
.ld-card a { color: var(--accent-hot); text-decoration: underline; text-underline-offset: 3px; }
.ld-quota { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ld-quota div { border: 1px solid var(--rule); border-radius: 10px; padding: 12px; }
.ld-quota b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 500; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.ld-quota span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  .dm-row, .dm-turn { opacity: 1; transform: none; transition: none; }
  .dm-bubble .dm-caret { display: none; }
  .demo-panel { animation: none; }
}
