/* ============================================================
   VARDIA BOT — production widget for vardia24.gr
   ------------------------------------------------------------
   Self-contained on purpose: this file must work on any page of
   the site, including ones that do not load assets/demo/demo-widget.css.
   It borrows the DEMO's look by reusing the same design tokens from
   assets/vardia.css, with hard fallbacks so nothing collapses if the
   token file is missing.

   Every selector is namespaced `vb-` so it cannot collide with the
   inline demo (`vd-`) that lives on the homepage.
   ============================================================ */

.vb-launcher,
.vb-panel { font-family: var(--font-body, system-ui, sans-serif); box-sizing: border-box; }
.vb-panel *, .vb-launcher * { box-sizing: border-box; }

/* ---------- launcher ---------- */
.vb-launcher {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 9998;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 1.1rem .7rem .85rem;
  border: 0; cursor: pointer;
  border-radius: var(--radius-full, 999px);
  background: var(--color-primary, #1F6E5A);
  color: var(--color-on-primary, #fff);
  font-size: .92rem; font-weight: 600;
  box-shadow: 0 18px 40px -18px rgba(32, 38, 43, .55);
  transition: transform .18s ease, box-shadow .18s ease;
}
.vb-launcher:hover { transform: translateY(-2px); }
.vb-launcher[hidden] { display: none; }
.vb-dot {
  width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--color-on-primary, #fff);
  animation: vbBreathe 2.4s ease-in-out infinite;
}
@keyframes vbBreathe { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- panel ---------- */
.vb-panel {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 9999;
  width: min(392px, calc(100vw - 2rem));
  max-height: min(640px, calc(100vh - 2rem));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--color-paper-raised, #FBFAF7);
  color: var(--color-ink, #20262B);
  border: 1px solid var(--color-hairline, rgba(32,38,43,.14));
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 32px 80px -32px rgba(32, 38, 43, .55);
  animation: vbRise .24s ease both;
}
.vb-panel[hidden] { display: none; }
@keyframes vbRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.vb-head {
  display: flex; align-items: center; gap: .7rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--color-hairline, rgba(32,38,43,.14));
  background:
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(32,38,43,.05) 6px 7px),
    var(--color-paper-raised, #FBFAF7);
}
.vb-head b {
  display: block; font-family: var(--font-display, Georgia, serif);
  font-weight: 400; font-size: 1.08rem; line-height: 1.2;
}
.vb-head small {
  font: 500 .58rem var(--font-mono, ui-monospace, monospace);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--color-dim, #5C6763);
}
.vb-live {
  margin-left: auto; display: inline-flex; align-items: center; gap: .4rem;
  font: 600 .62rem var(--font-body, system-ui); letter-spacing: .06em; text-transform: uppercase;
  background: var(--color-clockedin, #1F6E5A); color: var(--color-on-primary, #fff);
  border-radius: var(--radius-full, 999px); padding: .22rem .55rem;
}
.vb-live i { width: .4rem; height: .4rem; border-radius: 50%; background: currentColor;
  animation: vbBreathe 2.4s ease-in-out infinite; }
.vb-close {
  background: none; border: 0; cursor: pointer; font-size: 1.3rem; line-height: 1;
  color: var(--color-dim, #5C6763); padding: 0 .2rem;
}

/* ---------- thread ---------- */
.vb-thread {
  flex: 1; min-height: 220px; overflow-y: auto;
  display: flex; flex-direction: column; gap: .5rem;
  padding: 1rem;
  background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgba(32,38,43,.05) 27px 28px);
}
.vb-msg {
  max-width: 88%; padding: .58rem .85rem;
  border-radius: var(--radius-md, 10px);
  font-size: .92rem; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word;
  animation: vbPop .3s ease both;
}
@keyframes vbPop { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.vb-c { align-self: flex-end; background: var(--color-paper, #fff);
  border: 1px solid var(--color-hairline, rgba(32,38,43,.14));
  border-bottom-right-radius: var(--radius-sm, 6px); }
.vb-v { align-self: flex-start; background: rgba(31,110,90,.08);
  border: 1px solid rgba(31,110,90,.22);
  border-bottom-left-radius: var(--radius-sm, 6px); }
.vb-typing {
  align-self: flex-start; display: inline-flex; gap: .3rem;
  padding: .68rem .9rem; background: rgba(31,110,90,.08);
  border: 1px solid rgba(31,110,90,.18);
  border-radius: var(--radius-md, 10px); border-bottom-left-radius: var(--radius-sm, 6px);
}
.vb-typing i { width: .36rem; height: .36rem; border-radius: 50%;
  background: var(--color-clockedin, #1F6E5A); opacity: .4; animation: vbDot 1.1s infinite; }
.vb-typing i:nth-child(2) { animation-delay: .18s; }
.vb-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes vbDot { 0%,100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

/* The guardrail banner and the footer note were removed on 20/8/2026
   (George): a visitor asking a question should not have to read how the
   machine is built. The guardrail itself is untouched — the API still
   returns it and the validator still blocks; only the paint is gone.
   The rule-firing signal lives on in the homepage demo, where showing
   it IS the sales argument. */

/* ---------- chips ---------- */
.vb-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: .5rem 1rem 0; }
.vb-chips:empty { display: none; }
.vb-chip {
  font: 500 .82rem var(--font-body, system-ui);
  background: var(--color-paper, #fff); color: var(--color-ink, #20262B);
  border: 1px solid var(--color-hairline, rgba(32,38,43,.14));
  border-radius: var(--radius-full, 999px);
  padding: .34rem .8rem; cursor: pointer;
  transition: background .16s, color .16s, border-color .16s;
}
.vb-chip:hover { background: var(--color-ink, #20262B); color: var(--color-paper, #fff); }

/* ---------- input ---------- */
.vb-form { display: flex; gap: .45rem; padding: .75rem 1rem .4rem; }
.vb-form input {
  flex: 1; min-width: 0; font: 400 .93rem var(--font-body, system-ui);
  padding: .65rem .8rem;
  border: 1px solid var(--color-hairline, rgba(32,38,43,.14));
  border-radius: var(--radius-sm, 6px);
  background: var(--color-paper, #fff); color: var(--color-ink, #20262B);
}
.vb-form input:focus { outline: 2px solid var(--color-primary, #1F6E5A); outline-offset: 1px; }
.vb-form button {
  font: 700 1.05rem var(--font-body, system-ui);
  background: var(--color-primary, #1F6E5A); color: var(--color-on-primary, #fff);
  border: 0; border-radius: var(--radius-sm, 6px); padding: 0 1rem; cursor: pointer;
}
.vb-form button:hover { background: var(--color-primary-pressed, #17594A); }
.vb-form button[disabled] { opacity: .5; cursor: default; }

@media (max-width: 480px) {
  .vb-panel { right: .5rem; left: .5rem; bottom: .5rem; width: auto; max-height: calc(100vh - 1rem); }
  .vb-launcher { right: .8rem; bottom: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .vb-panel, .vb-msg { animation: none; }
  .vb-typing i, .vb-dot, .vb-live i { animation: none; }
  .vb-launcher:hover { transform: none; }
}
