/* The customer's video call page (0.136.0). Plain, calm, works on a phone. */
@font-face { font-family: "Source Sans 3"; font-weight: 400 700; font-display: swap; src: url(/fonts/SourceSans3-Latin1.woff) format("woff"); }
:root {
  --bg: #F4F7FB; --card: #fff; --text: #0E2238; --muted: #3D5570; --line: #D9E4EF; --primary: #003366; --on: #fff;
  --bad: #b3261e; --stage: #0b1b2e; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #061A30; --card: #0A2440; --text: #e9edf7; --muted: #A7BDD3; --line: #1d3b5c; --primary: #41E3D2; --on: #061A30; --bad: #ff8a7e; color-scheme: dark; }
}
/* 0.169.0: the website may choose the look (embedlogic.ts): theme=dark|light wins over the device's choice; accent and
   font are set on the page by the script (--primary, --on, --vp-font) */
:root[data-theme="light"] { --bg: #F4F7FB; --card: #fff; --text: #0E2238; --muted: #3D5570; --line: #D9E4EF; --bad: #b3261e; color-scheme: light; }
:root[data-theme="dark"] { --bg: #0b0f17; --card: #141a26; --text: #eef1f7; --muted: #a9b4c6; --line: #263042; --bad: #ff8a7e; --stage: #000; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 var(--vp-font, "Source Sans 3"), "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.vp { max-width: 1100px; margin: 0 auto; padding: 16px; }
.vp-head h1 { margin: 8px 0 0; font-size: 1.5rem; }
.vp-company { margin: 2px 0 12px; color: var(--muted); }
.vp-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 12px 0; display: grid; gap: 10px; max-width: 560px; }
.vp-note { margin: 8px 0; }
.vp-note.bad, .vp-error { color: var(--bad); }
.vp-small { margin: 0; color: var(--muted); font-size: .92rem; }
.vp-field { display: grid; gap: 4px; font-weight: 600; }
.vp-field input, .vp-send input { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.vp-consent { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); }
.vp-consent p { margin: 0 0 6px; white-space: pre-wrap; }
.vp-check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.vp-btn { font: inherit; font-weight: 600; border-radius: 999px; padding: 10px 18px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.vp-btn.primary { background: var(--primary); color: var(--on); border-color: var(--primary); }
.vp-btn:disabled { opacity: .6; cursor: default; }
.vp-btn:focus-visible, .vc-btn:focus-visible, .vp-link:focus-visible { outline: 3px solid #f4b942; outline-offset: 2px; }
.vp-preview { width: 100%; max-height: 260px; aspect-ratio: 16 / 9; object-fit: contain; background: var(--stage); border-radius: 12px; transform: scaleX(-1); }
.vp-field[hidden] { display: none; }
.vp-select { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-weight: 400; }
.vp-wait { text-align: center; justify-items: center; }
.vp-spin { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--primary); animation: vp-spin 1s linear infinite; }
@keyframes vp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vp-spin { animation: none; } }
.vp-call { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.vp-call .vp-top { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; }
.vp-clock { color: var(--muted); font-variant-numeric: tabular-nums; }
.vp-rec { margin-left: auto; color: var(--bad); font-weight: 700; font-size: .9rem; }
.vp-rec::before { content: "●"; margin-right: 4px; }
@media (max-width: 820px) { .vp-call { grid-template-columns: minmax(0, 1fr); } }
.vp-call > * { min-width: 0; }
.vc-stage video { max-width: 100%; }
.vp-chat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 8px; max-width: 560px; }
.vp-call .vp-chat { max-width: none; }
.vp-chat h2 { margin: 0; font-size: 1rem; }
.vp-msgs { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; display: grid; gap: 6px; }
.vp-msg { padding: 6px 10px; border-radius: 12px; background: var(--bg); max-width: 92%; }
.vp-msg.me { justify-self: end; background: color-mix(in srgb, var(--primary) 14%, var(--card)); }
.vp-msg.sending { opacity: .6; }
.vp-msg p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.vp-who { font-size: .8rem; color: var(--muted); font-weight: 700; }
.vp-img { display: block; max-width: 100%; max-height: 180px; border-radius: 8px; margin-top: 4px; }
.vp-link { font: inherit; background: none; border: 0; padding: 0; color: var(--primary); text-decoration: underline; cursor: pointer; text-align: left; }
.vp-typing { margin: 0; min-height: 1.2em; font-size: .88rem; color: var(--muted); }
.vp-send { display: flex; gap: 6px; flex-wrap: wrap; }
.vp-send input { flex: 1 1 160px; min-width: 0; }
.vp-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #0E2238; color: #fff; padding: 10px 16px; border-radius: 12px; max-width: min(92vw, 520px); z-index: 10; }
/* the call's stage (web/shared/lkcall.ts): the same rules as the agent desktop's (0.144.0) */
.vc-stage { position: relative; display: flex; flex-direction: column; gap: 0; background: #0b1b2e; border-radius: 12px; overflow: hidden; width: 100%; }
.vc-pic { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: var(--vc-h, 52vh); min-height: 180px; overflow: hidden; }
.vc-main { position: absolute; inset: 0; display: grid; place-items: center; }
.vc-main .vc-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.vc-label { position: absolute; left: 10px; bottom: 10px; color: #fff; background: rgba(0,0,0,.5); padding: 2px 8px; border-radius: 6px; font-size: .85rem; z-index: 2; }
.vc-label:empty { display: none; }
.vc-wait { position: relative; z-index: 1; color: #e9edf7; text-align: center; padding: 0 16px; margin: 0; }
.vc-side { position: absolute; left: 10px; top: 10px; width: 22%; min-width: 100px; border-radius: 8px; overflow: hidden; z-index: 2; background: #000; }
.vc-side .vc-video { width: 100%; display: block; object-fit: contain; }
.vc-self { position: absolute; right: 10px; top: 10px; width: 22%; min-width: 100px; max-width: 260px; aspect-ratio: 4 / 3; background: #1d3b5c; border-radius: 8px; overflow: hidden; display: grid; place-items: center; z-index: 3; box-shadow: 0 1px 6px rgba(0,0,0,.4); }
.vc-self[hidden] { display: none; }
.vc-stage[data-self="tl"] .vc-self { right: auto; left: 10px; }
.vc-stage[data-self="bl"] .vc-self { top: auto; bottom: 10px; right: auto; left: 10px; }
.vc-stage[data-self="br"] .vc-self { top: auto; bottom: 10px; }
.vc-stage[data-self="tl"] .vc-side { left: auto; right: 10px; }   /* their small camera moves out of the way */
.vc-self .vc-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.vc-self-off { color: #e9edf7; font-size: .8rem; padding: 4px; text-align: center; }
.vc-poor { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 4; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center;
  background: rgba(14,34,56,.92); color: #fff; padding: 6px 10px; border-radius: 10px; font-size: .9rem; max-width: calc(100% - 20px); }
.vc-poor[hidden] { display: none; }
.vc-dropped { background: rgba(122,62,0,.94); }   /* 0.161.0: the video was turned off by itself (amber: a warning) */
.vc-bar { position: static; display: flex; gap: 6px 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 10px; background: #0E2238; }
.vc-btns { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; flex: 1 1 auto; }
.vc-marks { display: flex; gap: 10px; flex-wrap: wrap; font-size: .8rem; color: #e9edf7; }
.vc-mark::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: #9fb3c8; vertical-align: 1px; }
.vc-mark[data-q="good"]::before { background: #3ecf8e; }
.vc-mark[data-q="fair"]::before { background: #f4b942; }
.vc-mark[data-q="poor"]::before { background: #ff6b5e; }
.vc-btn { font: inherit; font-size: .9rem; font-weight: 600; border-radius: 999px; padding: 6px 12px; border: 0; background: rgba(255,255,255,.92); color: #0E2238; cursor: pointer; }
.vc-btn.off, .vc-btn.on { background: #f4b942; }
.vc-btn.vc-end { background: #c0352b; color: #fff; }
.vc-btn:disabled { opacity: .55; cursor: default; }
.vc-btn:focus-visible { outline: 3px solid #f4b942; outline-offset: 2px; }
.vc-stage.vc-ended { opacity: .5; }
/* full screen (the agent's button): the picture takes everything above the bar */
.vc-stage:fullscreen { border-radius: 0; height: 100vh; }
.vc-stage:fullscreen .vc-pic { flex: 1 1 auto; aspect-ratio: auto; max-height: none; height: auto; }
.vc-full-out { display: none; }
.vc-stage:fullscreen .vc-full-out { display: inline-block; }

/* 0.157.1: a KHz Link voice call: no picture box, a short band with who the call is with */
.vc-voice .vc-pic { aspect-ratio: auto; min-height: 0; height: auto; padding: 22px 12px; }
.vc-voice .vc-self, .vc-voice .vc-side, .vc-voice .vc-poor { display: none; }
.vc-voice .vc-main { position: relative; inset: auto; }
/* 0.182.0: "Fill screen" crops the other person's picture to the box (the whole picture stays the default); on a phone
   held upright the box is upright too, so an upright camera fills it. */
.vc-fill .vc-main .vc-video.vc-camera { object-fit: cover; }
@media (orientation: portrait) and (pointer: coarse) {
  .vc-pic { aspect-ratio: 3 / 4; max-height: var(--vc-h-portrait, 64vh); }
}
.vc-btn.vc-quality { min-width: 9.5rem; }
/* 0.209.0: controls=none (the call inside a website whose own buttons send commands): no button row */
.vc-bar[hidden], .vc-no-controls .vc-bar { display: none !important; }
.vc-stage { --vc-h: 72vh; background: var(--stage); border-radius: 16px; }
@media (min-width: 821px) { .vc-pic { min-height: 260px; } }
@media (max-width: 820px) { .vc-pic { aspect-ratio: 3 / 4; --vc-h: 62vh; } .vc-label { bottom: auto; top: 10px; left: 50%; transform: translateX(-50%); } .vc-btn { padding: 8px 14px; font-size: .92rem; } }
/* 0.145.0: an AI avatar answers first (avatar.ts) */
.vp-avatar { max-width: 720px; }
.vp-av-head { display: flex; gap: 8px; align-items: center; }
.vp-av-tag { font-size: .8rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.vp-av-stage { position: relative; aspect-ratio: 16 / 9; max-height: 60vh; width: 100%; background: var(--stage); border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.vp-av-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.vp-av-wait { color: #e9edf7; margin: 0; padding: 0 16px; text-align: center; }
.vp-av-wait[hidden] { display: none; }
.vp-av-row { display: flex; gap: 8px; flex-wrap: wrap; }
.vp-btn.off { background: #f4b942; color: #0E2238; border-color: #f4b942; }

/* 0.169.0: inside a company's website (?embed=1): the call fills the frame (16:9 or any shape), the buttons along the
   bottom; no heading, no margins, no messages box (the website shows its own words); cards centred in the frame */
.vp-embed, .vp-embed body { height: 100%; overflow: hidden; }
.vp-embed .vp { max-width: none; margin: 0; padding: 0; height: 100%; display: grid; place-items: center; }
.vp-embed .vp > * { width: 100%; }
.vp-embed .vp-card { margin: 0 auto; max-width: min(520px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; }
.vp-embed .vp-note { text-align: center; padding: 0 12px; }
.vp-embed .vp-chat, .vp-embed .vp-top { display: none; }
.vp-embed .vp-call { display: block; height: 100%; }
.vp-embed .vc-stage { height: 100%; border-radius: 0; }
.vp-embed .vc-pic { flex: 1 1 auto; aspect-ratio: auto; max-height: none; min-height: 0; height: auto; }
.vp-embed .vc-bar { flex: 0 0 auto; padding: 6px 8px; background: rgba(0,0,0,.85); }
.vp-embed .vc-btn.vc-end { background: #c0352b; }
.vp-embed .vc-btn.on, .vp-embed .vc-btn.off { background: var(--primary); color: var(--on); }
.vp-embed .vp-avatar { max-width: none; height: 100%; }
.vp-embed .vp-av-stage { max-height: none; height: 100%; aspect-ratio: auto; border-radius: 0; }
.vp-embed .vp-consent-text { margin: 0; white-space: pre-wrap; }
@media (max-width: 820px) { .vp-embed .vc-pic { aspect-ratio: auto; } }
/* 0.209.0: controls=none: the AI assistant's Mute / Talk to a person row is the website's */
.vp-av-row[hidden] { display: none !important; }
