/* Jam2Studio — AI Concierge widget. Χρησιμοποιεί τα tokens του styles.css (--ink, --bone, --red…).
   Χωρίς inline styles (CSP style-src 'self'). */

.jc { --jc-bg: var(--ink-2, #17171a); --jc-bg-2: var(--ink-3, #212124); --jc-line: var(--line, #2c2c31); --jc-fg: var(--bone, #f1ede6); --jc-mute: var(--smoke, #9a958e); --jc-accent: var(--red, #e3262c); --jc-accent-text: var(--red-text, #ff5a4f); font-family: var(--font, system-ui, sans-serif); font-size: 1rem; line-height: 1.5; color: var(--jc-fg); }
.jc *, .jc *::before, .jc *::after { box-sizing: border-box; }
.jc [hidden] { display: none !important; }

/* ---------- Launcher */
.jc-launcher { position: fixed; z-index: 40; right: calc(1rem + env(safe-area-inset-right, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: .6rem; min-height: 3.25rem; padding: .5rem 1.15rem .5rem .9rem; background: var(--jc-accent); color: #fff; border: 0; border-radius: 0; font: inherit; font-weight: 650; font-size: .975rem; cursor: pointer; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }
.jc-launcher:hover { background: #c81d23; }
.jc-launcher:focus-visible, .jc-close:focus-visible, .jc-chip:focus-visible, .jc-act:focus-visible, .jc-send:focus-visible, .jc-link:focus-visible, .jc-input:focus-visible, .jc-foot a:focus-visible, .jc-msg a:focus-visible { outline: 2px solid var(--jc-accent-text); outline-offset: 2px; }
.jc-launcher__icon { display: inline-flex; width: 1.5rem; height: 1.5rem; }
.jc-launcher__icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.jc.is-open .jc-launcher { display: none; }
body.menu-open .jc-launcher { display: none; }

/* ---------- Panel */
.jc-panel { position: fixed; z-index: 90; right: calc(1rem + env(safe-area-inset-right, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); width: min(24.5rem, calc(100vw - 2rem)); height: min(38rem, calc(100dvh - 2rem)); display: flex; flex-direction: column; background: var(--jc-bg); border: 1px solid var(--jc-line); box-shadow: 0 16px 56px rgba(0, 0, 0, .6); }
.jc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; padding: .9rem 1rem .8rem 1.1rem; border-bottom: 1px solid var(--jc-line); border-top: 3px solid var(--jc-accent); }
.jc-title { margin: 0; font-stretch: 42%; font-weight: 820; text-transform: uppercase; font-size: 1.35rem; line-height: 1; letter-spacing: .01em; }
.jc-sub { margin: .35rem 0 0; font-size: .8125rem; color: var(--jc-mute); line-height: 1.35; }
.jc-close { flex: none; width: 2.75rem; height: 2.75rem; margin: -.5rem -.45rem 0 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--jc-fg); border: 0; border-radius: 0; cursor: pointer; }
.jc-close:hover { background: var(--jc-bg-2); }
.jc-close svg { width: 1.25rem; height: 1.25rem; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }

/* ---------- Μηνύματα */
.jc-log { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .75rem; scrollbar-width: thin; scrollbar-color: var(--jc-line) transparent; }
.jc-log:focus-visible { outline-offset: -2px; }
.jc-msg { max-width: 92%; padding: .65rem .85rem; font-size: .975rem; overflow-wrap: anywhere; }
.jc-msg p { margin: 0; }
.jc-msg p + p { margin-top: .55rem; }
.jc-msg--bot { align-self: flex-start; background: var(--jc-bg-2); border-left: 3px solid var(--jc-accent); }
.jc-msg--user { align-self: flex-end; background: var(--jc-fg); color: var(--ink, #0f0f10); }
.jc-msg a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.jc-msg--bot a { color: var(--jc-accent-text); }
.jc-note { align-self: stretch; margin: 0; font-size: .8125rem; color: var(--jc-mute); }
.jc-typing { align-self: flex-start; display: inline-flex; gap: .3rem; padding: .8rem .9rem; background: var(--jc-bg-2); border-left: 3px solid var(--jc-accent); }
.jc-typing span:not(.visually-hidden) { width: .4rem; height: .4rem; background: var(--jc-mute); border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) {
  .jc-panel { animation: jc-in .22s var(--ease, ease-out) both; }
  .jc-typing span:not(.visually-hidden) { animation: jc-dot 1s infinite ease-in-out; }
  .jc-typing span:nth-child(3) { animation-delay: .15s; }
  .jc-typing span:nth-child(4) { animation-delay: .3s; }
  @keyframes jc-in { from { opacity: 0; transform: translateY(12px); } }
  @keyframes jc-dot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
}

/* ---------- Chips και κουμπιά ενεργειών */
.jc-choices { align-self: stretch; display: flex; flex-wrap: wrap; gap: .5rem; }
.jc-chip, .jc-act { min-height: 2.75rem; padding: .5rem .9rem; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; border-radius: 0; text-align: left; }
.jc-chip { background: transparent; color: var(--jc-fg); border: 1px solid var(--jc-line); }
.jc-chip:hover { border-color: var(--jc-fg); }
.jc-act { background: var(--jc-accent); color: #fff; border: 1px solid var(--jc-accent); }
.jc-act:hover { background: #c81d23; border-color: #c81d23; }
.jc-act--ghost { background: transparent; color: var(--jc-fg); border-color: var(--jc-line); }
.jc-act--ghost:hover { background: var(--jc-bg-2); border-color: var(--jc-fg); }
.jc-act[disabled], .jc-chip[disabled] { opacity: .55; cursor: default; }

/* ---------- Σύνοψη πριν την αποστολή */
.jc-summary { align-self: stretch; margin: 0; padding: .7rem .85rem; background: var(--ink, #0f0f10); border: 1px solid var(--jc-line); font-size: .9rem; }
.jc-summary dt { margin-top: .5rem; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--jc-mute); }
.jc-summary dt:first-child { margin-top: 0; }
.jc-summary dd { margin: .1rem 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }

/* ---------- Φόρμα εισαγωγής */
.jc-form { display: flex; align-items: flex-end; gap: .5rem; padding: .7rem .8rem; border-top: 1px solid var(--jc-line); }
.jc-input { flex: 1 1 auto; min-width: 0; min-height: 2.75rem; max-height: 7.5rem; padding: .6rem .75rem; resize: none; background: var(--ink, #0f0f10); color: var(--jc-fg); border: 1px solid var(--jc-line); border-radius: 0; font: inherit; font-size: 1rem; line-height: 1.4; }
.jc-input::placeholder { color: var(--jc-mute); }
.jc-input:disabled { opacity: .5; }
.jc-send { flex: none; width: 2.75rem; height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; background: var(--jc-accent); color: #fff; border: 0; border-radius: 0; cursor: pointer; }
.jc-send:hover { background: #c81d23; }
.jc-send[disabled] { opacity: .5; cursor: default; }
.jc-send svg { width: 1.2rem; height: 1.2rem; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.jc-foot { margin: 0; padding: 0 1rem .8rem; font-size: .75rem; line-height: 1.4; color: var(--jc-mute); }
.jc-foot a, .jc-link { color: var(--jc-fg); }
.jc-link { padding: 0; background: none; border: 0; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* ---------- Κινητό: πλήρης οθόνη */
@media (max-width: 520px) {
  .jc-panel { inset: 0; width: 100%; height: 100dvh; max-height: none; border: 0; padding-top: env(safe-area-inset-top, 0px); }
  .jc-foot { padding-bottom: calc(.8rem + env(safe-area-inset-bottom, 0px)); }
  .jc-input { font-size: 1rem; }
}
html.jc-lock { overflow: hidden; }
@media (min-width: 521px) { html.jc-lock { overflow: visible; } }

@media print { .jc { display: none; } }
