/* Visitor chat: one column, mobile first. On wide screens the conversation sits in a centred column. */

body { background: var(--surface-2); }

.app {
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  max-width: 46rem; margin: 0 auto;
  background: var(--paper);
}
@media (min-width: 760px) {
  .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

.chat-head {
  display: flex; align-items: center; gap: 0.85rem;
  padding: calc(0.7rem + env(safe-area-inset-top)) 0.75rem 0.7rem 1rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.head-text { flex: 1; min-width: 0; }
.head-text h1 {
  margin: 0; font-size: var(--step-1); font-weight: 650; letter-spacing: -0.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.head-text p { margin: 0; font-size: var(--step--1); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-text p[data-state="online"] { color: var(--lagoon-strong); }
.head-text p[data-state="typing"] { color: var(--amber-ink); font-style: italic; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .head-text p[data-state="typing"] { color: var(--amber); } }

.scroller { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.scroller:focus { outline: none; }

.offer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin: 0 0.75rem 0.5rem; padding: 0.85rem 1rem; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-float);
}
.offer h2 { margin: 0; font-size: var(--step-0); }
.offer p { margin: 0.1rem 0 0; font-size: var(--step--1); color: var(--muted); }
.offer-actions { display: flex; gap: 0.4rem; margin-left: auto; }
.private-note { margin-top: 0.5rem; border-left: 4px solid var(--amber); }

.fatal {
  min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; text-align: center; padding: 2rem;
}
.fatal h1 { font-size: var(--step-2); margin: 0 0 0.5rem; }
.fatal p { margin: 0 0 1.25rem; color: var(--ink-2); max-width: 28rem; }

/* ---------- Phase 9: inside the website widget ---------- */
[data-embed] .chat-head { padding-right: 0.5rem; }
[data-embed] #closeEmbed { margin-left: -0.25rem; }

/* notification setup window opened by the widget */
.notify-setup { max-width: 26rem; margin: 12vh auto 0; padding: 1.5rem; text-align: center; }
.notify-setup h1 { font-size: var(--step-2); margin: 0 0 0.5rem; }
.notify-setup p { color: var(--ink-2); }
.notify-setup .btn { margin-top: 0.5rem; }
