/* RENEXUS DEMO — watermark + demo-footer stilusok.
 *
 * Z-index reteg:
 *   - watermark:     1     (hatterben, minden interaktiv UI alatt)
 *   - demo-footer:   999   (lablecen, DEMO sav alatt)
 *   - demo-bar:      9999  (a _demo_bar.html-ben mar 9999, top)
 *   - welcome modal: 10000 (a _welcome_modal.html-ben 10000, fix)
 *   - tippy:         9999+ (Tippy alapertelmezett, dinamikus)
 *
 * Body padding: top:44 (DEMO sav) + bottom:32 (demo footer)
 */

body {
  padding-bottom: 36px !important;
}
/* Paranoid: a kornyezeti CSS-ekkel szemben minimum-height + relative pozicio
   ahhoz, hogy a fixed footer biztosan latszodjon az oldal aljan, gorgetes nelkul. */
html, body {
  min-height: 100vh;
}

/* ============ WATERMARK ============ */
.rnx-demo-watermark {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}
.rnx-demo-watermark__inner {
  position: absolute;
  inset: -20vh -20vw;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(6, 1fr);
  transform: rotate(-30deg);
  transform-origin: center center;
}
.rnx-demo-watermark__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  opacity: 0.07;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 1.2px;
  white-space: nowrap;
}

/* ============ DEMO FOOTER ============ */
.rnx-demo-footer {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 999 !important;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  color: #6b7280;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 11.5px;
  line-height: 1.4;
  text-align: center;
  padding: 6px 12px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.rnx-demo-footer strong {
  color: #1a1a1a;
}

/* ============ VINCENT DOCK Z-INDEX + OFFSET (demo-only) ============ */
/* A demo sav (44px top) es a demo footer (32px bottom) ne takarja */
body.rnx-demo .vincent-dock {
  top: 50px !important;
  bottom: 40px !important;
  height: calc(100vh - 90px) !important;
  max-height: calc(100vh - 90px) !important;
  z-index: 100 !important;
}
body.rnx-demo .vincent-dock[data-state="collapsed"] {
  top: 50px !important;
  bottom: 40px !important;
}

/* ============ DEMO DISABLED ELEMENTS ============ */
/* Doksi-feltoltes zonak demo-modban tiltva */
body.rnx-demo #uploadBox,
body.rnx-demo #muszakiUploadBox,
body.rnx-demo #uploadBtn,
body.rnx-demo #muszakiUploadBtn {
  opacity: 0.45 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
  position: relative;
}
body.rnx-demo #uploadBox::after,
body.rnx-demo #muszakiUploadBox::after {
  content: "DEMO: nem tölthető";
  position: absolute;
  top: 6px; right: 8px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  border: 1px solid #f59e0b;
}

/* "Elemzes inditasa" gomb a doksi-kartyak alatt — felrevezeto, eltavolitva */
body.rnx-demo #analyzeBtn {
  display: none !important;
}

/* ============ VINCENT DOCK CHAT — DINAMIKUS MAGASSAG ============ */
/* A 6 akkordion-szekcio felcsukva tul nagy teruletet foglal a chat-tol.
   - #vd-content: max-height 50vh helyett dinamikus (35vh ceiling, de
     min-height nelkul, igy ha minden szekcio felcsukott, csak a header-ek
     latszanak, es a chat kapja a teret).
   - .vd-chat-history: bottom-aligned uzenetek (justify-content flex-end),
     az ures ter felulre kerul — sokkal teltebb chat-elmeny. */
/* #vd-content (6 accordion szekcio) — szigoru cap, hogy a chat-history-nak
   GARANTALTAN legyen helye. Felcsukva a 6 szekcio fejlece ~240px,
   kinyitott szekcio scroll-os a 280px-es burokban. */
body.rnx-demo #vd-content {
  max-height: 280px !important;
  flex: 0 1 auto !important;
  overflow-y: auto !important;
}
/* Chat-history: garantalt min 40vh magassag + flex-grow-szorzo. */
body.rnx-demo .vd-chat-history {
  display: flex !important;
  flex-direction: column !important;
  flex: 2 1 auto !important;
  min-height: 40vh !important;
  position: relative !important;
}
/* Sticky-bottom: VALÓDI DOM-spacer (NEM pseudo). A demo_tooltips.js
   inject-elja az elsó pozícióra, flex-grow:1 vel tolja az üzeneteket
   az aljára. A pseudo-element flex-spacer trukk Chromeban edge-case-ben
   nem mindig mukodik (kulonbozo flex-context-ek), igy valodi div a stabil. */
body.rnx-demo .vd-chat-demo-spacer {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  align-self: stretch !important;
}
/* TRIPLA BIZTOSITAS: ha a spacer flex-grow valamiert nem mukodik,
   az osszes chat-msg gyermek elsoje is kapjon margin-top: auto-t.
   Ket fuggetlen mechanizmus, ami ugyanazt eri el — bommal-fix. */
body.rnx-demo .vd-chat-history > .vd-chat-msg:first-of-type {
  margin-top: auto !important;
}
/* Empty allapot placeholder — JS hidja a regi vd-chat-empty class-szal,
   uj megoldasban a placeholder is a spacer-en at jelenik. */

