/* "Chat with us" (chat.js): self-contained, so app.conferencedesk.app can load it beside its own styles. Brand colours
   from site.css; dark when the device is dark; no movement when reduced motion is asked for. Text 14px at least. */
.cdc-launch, .cdc {
  --cdc-paper: #F8F6F1; --cdc-surface: #FFFFFF; --cdc-ink: #231B32; --cdc-text2: #5E566A; --cdc-line: #DEDAD3;
  --cdc-action: #231B32; --cdc-on-action: #F8F6F1; --cdc-focus: #6246A6; --cdc-us: #EFE9FA; --cdc-you: #FFFFFF;
  --cdc-error: #B4261E; --cdc-link: #4E3787; --cdc-field: #857C92;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  .cdc-launch, .cdc {
    --cdc-paper: #1B1626; --cdc-surface: #241E31; --cdc-ink: #F3F0F7; --cdc-text2: #C3BBCF; --cdc-line: #3D3550;
    --cdc-action: #F3F0F7; --cdc-on-action: #1B1626; --cdc-focus: #C8B8F2; --cdc-us: #352C4A; --cdc-you: #241E31;
    --cdc-error: #FF9C94; --cdc-link: #C8B8F2; --cdc-field: #8C82A0;
  }
}
.cdc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.cdc-launch {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 2147483000;
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--cdc-action); color: var(--cdc-on-action); font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1; cursor: pointer;
  box-shadow: 0 10px 28px -10px rgba(35, 27, 50, 0.55);
}
.cdc-launch:hover { filter: brightness(1.12); }
.cdc-launch:focus-visible, .cdc :focus-visible { outline: 3px solid var(--cdc-focus); outline-offset: 2px; }
@media print { .cdc-launch { display: none; } }

.cdc {
  position: fixed; inset: auto max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) auto; margin: 0;
  width: min(400px, calc(100vw - 32px)); max-height: min(640px, calc(100dvh - 32px)); padding: 0; border: 1px solid var(--cdc-line); border-radius: 16px;
  background: var(--cdc-paper); color: var(--cdc-ink); font-size: 15px; line-height: 1.5; box-shadow: 0 28px 56px -24px rgba(35, 27, 50, 0.5); overflow: hidden;
}
.cdc::backdrop { background: rgba(27, 22, 38, 0.32); }
.cdc[open] { display: flex; flex-direction: column; }
.cdc-in { display: flex; flex-direction: column; min-height: 0; max-height: inherit; padding: 16px 18px 14px; gap: 10px; overflow: auto; }
.cdc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cdc-head h2 { margin: 0; font: 600 19px/1.25 Newsreader, Georgia, serif; color: var(--cdc-ink); }
.cdc-x { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -8px -10px -8px 0; border: 0; border-radius: 999px; background: transparent; color: var(--cdc-ink); cursor: pointer; }
.cdc-x:hover { background: var(--cdc-us); }
.cdc-when, .cdc-note, .cdc-field small { margin: 0; color: var(--cdc-text2); font-size: 14px; }
.cdc-note a, .cdc-link { color: var(--cdc-link); }

.cdc-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.cdc-field { display: flex; flex-direction: column; gap: 4px; }
.cdc-field label { font-weight: 600; font-size: 14px; }
.cdc-field input, .cdc-field textarea {
  width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 12px; border: 1px solid var(--cdc-field); border-radius: 10px;
  background: var(--cdc-surface); color: var(--cdc-ink); font: inherit; font-size: 16px; /* 16px: no zoom on iPhone */
}
.cdc-field textarea { resize: vertical; min-height: 88px; }
.cdc-field [aria-invalid="true"] { border-color: var(--cdc-error); box-shadow: 0 0 0 1px var(--cdc-error); }
.cdc-err { margin: 0; padding: 8px 12px; border-left: 4px solid var(--cdc-error); background: var(--cdc-surface); color: var(--cdc-error); font-size: 14px; font-weight: 600; }
.cdc-info { margin: 0; padding: 8px 12px; border-left: 4px solid var(--cdc-focus); background: var(--cdc-surface); font-size: 14px; }
.cdc-captcha:empty { display: none; }
.cdc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cdc-btn { min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--cdc-action); color: var(--cdc-on-action); font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1; cursor: pointer; align-self: flex-start; }
.cdc-btn:disabled { opacity: 0.65; cursor: progress; }
.cdc-link { padding: 10px 0; border: 0; background: none; font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }

.cdc-log { list-style: none; margin: 0; padding: 4px 2px; display: flex; flex-direction: column; gap: 8px; max-height: 300px; min-height: 80px; overflow-y: auto; }
.cdc-msg { max-width: 88%; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--cdc-line); }
.cdc-msg p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cdc-us { align-self: flex-start; background: var(--cdc-us); border-color: transparent; }
.cdc-you { align-self: flex-end; background: var(--cdc-you); }
.cdc-who { display: block; color: var(--cdc-text2); font-size: 14px; }
.cdc-wait, .cdc-closed { color: var(--cdc-text2); font-size: 14px; text-align: center; }

/* phones: a sheet along the bottom, the full width */
@media (max-width: 520px) {
  .cdc { inset: auto 0 0 0; width: 100%; max-width: 100%; max-height: calc(100dvh - 24px); border-radius: 16px 16px 0 0; border-width: 1px 0 0; }
  .cdc-in { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .cdc-log { max-height: 40dvh; }
  .cdc-launch span { font-size: 15px; }
}
@media (prefers-reduced-motion: no-preference) {
  .cdc[open] { animation: cdc-in 0.18s ease-out; }
  .cdc[open]::backdrop { animation: cdc-fade 0.18s ease-out; }
}
@keyframes cdc-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes cdc-fade { from { opacity: 0; } }
