/* Floating chat bubble on the marketing site */
.cw { position: fixed; right: 20px; bottom: 20px; z-index: 90; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink, #0e1236); }
.cw * { box-sizing: border-box; }
.cw-fab { position: relative; display: grid; place-items: center; width: 58px; height: 58px; margin-left: auto; border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: linear-gradient(135deg, #3e40e8, #6d3fee 55%, #c025d3); box-shadow: 0 14px 30px -10px rgba(109, 63, 238, .75), 0 4px 10px -4px rgba(16, 24, 40, .3); transition: transform .18s ease, box-shadow .18s ease; }
.cw-fab:hover { transform: translateY(-2px) scale(1.04); }
.cw-fab:focus-visible { outline: 3px solid #fff; outline-offset: 0; box-shadow: 0 0 0 5px var(--accent, #6d3fee); }
.cw-fab svg { position: absolute; width: 26px; height: 26px; transition: opacity .18s ease, transform .2s ease; }
.cw-ic-x { opacity: 0; transform: rotate(-60deg) scale(.6); }
.cw.open .cw-ic-chat { opacity: 0; transform: rotate(60deg) scale(.6); }
.cw.open .cw-ic-x { opacity: 1; transform: none; }

/* Teaser message above the button */
.cw-teaser { position: absolute; right: 0; bottom: 72px; width: max-content; max-width: min(300px, calc(100vw - 28px)); opacity: 0; transform: translateY(10px) scale(.96); transform-origin: bottom right; transition: opacity .3s ease, transform .3s ease; }
.cw-teaser[hidden] { display: none; }
.cw-teaser.cw-visible { opacity: 1; transform: none; }
.cw-teaser-open { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 36px 12px 12px; text-align: left; cursor: pointer; font-family: inherit; color: var(--ink, #0e1236); background: #fff; border: 1px solid var(--line, #e8e6f0); border-radius: 18px 18px 4px 18px; box-shadow: 0 18px 40px -16px rgba(40, 22, 120, .4), 0 4px 12px -6px rgba(16, 24, 40, .2); }
.cw-teaser-open:hover { border-color: #d9d0f7; }
.cw-teaser-open:focus-visible { outline: 2px solid var(--accent, #6d3fee); outline-offset: 2px; }
.cw-teaser .cw-avatar { width: 38px; height: 38px; background: var(--accent-soft, #ede7ff); }
.cw-teaser-text { font-size: 14.5px; line-height: 1.4; }
.cw-teaser-text b { display: block; font-size: 12.5px; color: var(--muted, #66707c); font-weight: 600; margin-bottom: 1px; }
.cw-teaser-x { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: var(--muted, #66707c); background: transparent; }
.cw-teaser-x:hover { background: #f1eff8; color: var(--ink, #0e1236); }
.cw-teaser-x svg { width: 14px; height: 14px; }
.cw.open .cw-teaser { display: none; }

.cw-panel { position: absolute; right: 0; bottom: 74px; width: 368px; max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line, #e8e6f0); border-radius: 22px; box-shadow: 0 30px 70px -24px rgba(40, 22, 120, .45), 0 8px 24px -10px rgba(16, 24, 40, .25); opacity: 0; transform: translateY(12px) scale(.97); transform-origin: bottom right; transition: opacity .2s ease, transform .22s ease; }
.cw-panel[hidden] { display: none; }
.cw.open .cw-panel { opacity: 1; transform: none; }
.cw-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; color: #fff; background: linear-gradient(135deg, #3e40e8, #6d3fee 55%, #a62fd0); }
.cw-avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: #fff; }
.cw-avatar img { display: block; }
.cw-title { flex: 1; min-width: 0; line-height: 1.25; }
.cw-title b { display: block; font-size: 16px; }
.cw-title small { display: block; font-size: 12.5px; opacity: .88; }
.cw-x { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .16); }
.cw-x:hover { background: rgba(255, 255, 255, .28); }
.cw-x svg { width: 18px; height: 18px; }
.cw-body { overflow-y: auto; padding: 16px 18px 18px; background: #faf9ff; }
.cw-form { display: grid; gap: 12px; }
.cw-form[hidden] { display: none; }
.cw-msg p { display: inline-block; margin: 0; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid var(--line, #e8e6f0); font-size: 14.5px; line-height: 1.45; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.cw-topic { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.cw-topic label { position: relative; cursor: pointer; }
.cw-topic input { position: absolute; opacity: 0; inset: 0; }
.cw-topic span { display: block; padding: 9px 10px; text-align: center; font-size: 14px; font-weight: 600; border-radius: 999px; background: #fff; border: 1px solid var(--line, #e8e6f0); color: var(--ink-2, #3f4a55); transition: background .15s, border-color .15s, color .15s; }
.cw-topic input:checked + span { background: var(--accent-soft, #ede7ff); border-color: var(--accent, #6d3fee); color: var(--accent-ink, #4a2bd0); }
.cw-topic input:focus-visible + span { outline: 2px solid var(--accent, #6d3fee); outline-offset: 2px; }
.cw-field { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2, #3f4a55); }
.cw-field input, .cw-field textarea { width: 100%; font-family: inherit; font-size: 15px; line-height: 1.4; color: var(--ink, #0e1236); padding: 10px 12px; background: #fff; border: 1px solid #dcd9e8; border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.cw-field textarea { resize: vertical; min-height: 92px; max-height: 220px; }
.cw-field input:focus, .cw-field textarea:focus { outline: 0; border-color: var(--accent, #6d3fee); box-shadow: 0 0 0 3px var(--accent-soft, #ede7ff); }
.cw-field .bad { border-color: #c9302c; }
.cw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cw-err { margin: 0; padding: 9px 12px; border-radius: 10px; background: #fde9e8; color: #a3231f; font-size: 13.5px; }
.cw-err[hidden] { display: none; }
.cw-send, .cw-again { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1; color: #fff; background: var(--ink, #0e1236); transition: background .15s, transform .15s; }
.cw-send:hover { background: #26303a; transform: translateY(-1px); }
.cw-send:disabled { opacity: .6; cursor: default; transform: none; }
.cw-send svg { width: 17px; height: 17px; }
.cw-done { display: grid; justify-items: center; gap: 8px; padding: 22px 6px 8px; text-align: center; }
.cw-done[hidden] { display: none; }
.cw-done b { font-size: 17px; }
.cw-done p { margin: 0; color: var(--ink-2, #3f4a55); font-size: 14.5px; line-height: 1.5; }
.cw-done p span { font-weight: 600; word-break: break-all; }
.cw-check { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: #e3f6ee; color: #0f8a5f; }
.cw-check svg { width: 26px; height: 26px; }
.cw-again { margin-top: 10px; height: 42px; color: var(--accent-ink, #4a2bd0); background: var(--accent-soft, #ede7ff); }
.cw-again:hover { background: #e2d9ff; }
.cw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 560px) {
	.cw { right: 14px; bottom: 14px; }
	.cw-fab { width: 54px; height: 54px; }
	.cw-teaser { bottom: 68px; }
	/* Full screen on phones */
	.cw-panel { position: fixed; inset: 0; width: auto; height: 100vh; height: 100dvh; max-height: none; border: 0; border-radius: 0; box-shadow: none; transform: translateY(24px); transform-origin: bottom center; }
	.cw.open .cw-panel { transform: none; }
	.cw.open .cw-fab { visibility: hidden; }
	.cw-head { padding: calc(14px + env(safe-area-inset-top)) 14px 14px 18px; }
	.cw-body { flex: 1; padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
	.cw-field input, .cw-field textarea { font-size: 16px; } /* stops iOS zooming into fields */
	.cw-field textarea { min-height: 120px; }
	.cw-x { width: 40px; height: 40px; }
}
html.cw-lock, html.cw-lock body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .cw-panel, .cw-fab, .cw-fab svg, .cw-teaser { transition: none; } }
@media print { .cw { display: none; } }
