/* Notary Assistant — floating window (desktop) and full screen (phone). Uses the tokens of site.css. */
.cca { --cca-w: 400px; font-family: var(--f-sans); color: var(--ink); }
.cca-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:where(.cca) button { font: inherit; color: inherit; }

/* Launcher: a pill with words on computers; a round button above the app bar on phones. */
.cca-launcher { position: fixed; z-index: 70; right: 16px; bottom: calc(var(--tab-h) + 14px); display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px; border: 0; border-radius: 999px; background: var(--white); color: var(--deep); font-weight: 700; font-size: 1rem; cursor: pointer; box-shadow: 0 0 0 1px var(--line), 0 18px 36px -14px rgba(10, 35, 80, .55); transition: transform 180ms var(--ease), opacity 180ms ease; }
.cca-launcher:active { transform: scale(.96); }
.cca-launcher__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(140deg, var(--royal), var(--sky)); color: #fff; }
.cca-launcher__icon svg { width: 22px; height: 22px; }
.cca-launcher__text { display: none; padding-right: 12px; }
.cca-launcher__dot { position: absolute; top: 4px; left: 40px; width: 12px; height: 12px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 2px #fff; }
.cca.is-open .cca-launcher { transform: scale(.94); opacity: 0; pointer-events: none; }
@media (min-width: 900px) { .cca-launcher { right: 24px; bottom: 24px; padding-right: 8px; } .cca-launcher__text { display: inline; } }

.cca-panel { position: fixed; z-index: 90; inset: 0; display: flex; flex-direction: column; background: var(--white); padding-top: env(safe-area-inset-top); opacity: 0; transform: translateY(24px); transition: opacity 220ms ease, transform 300ms var(--ease); }
.cca-panel.is-in { opacity: 1; transform: none; }
.cca-panel[hidden] { display: none; }
html.cca-locked, html.cca-locked body { overflow: hidden; }
@media (min-width: 900px) {
	.cca-panel { inset: auto 24px 24px auto; width: var(--cca-w); height: min(680px, calc(100vh - 48px)); border-radius: 22px; border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(11, 22, 48, .06), 0 40px 90px -30px rgba(10, 35, 80, .6); overflow: hidden; transform-origin: bottom right; transform: translateY(12px) scale(.97); padding-top: 0; }
}

.cca-head { display: flex; align-items: center; gap: 12px; padding: 16px 12px 14px 16px; background: radial-gradient(130% 120% at 100% 0%, var(--deep-2), var(--deep)); color: #fff; }
.cca-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(140deg, var(--royal), var(--sky)); color: #fff; flex: none; }
.cca-mark svg { width: 22px; height: 22px; }
.cca-titles { min-width: 0; flex: 1; }
.cca-title { font: 400 1.5rem/1 var(--f-disp); margin: 0; color: #fff; }
.cca-sub { margin: 4px 0 0; font-size: .84rem; color: var(--on-deep-2); }
.cca-iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; flex: none; transition: background-color 160ms ease, transform 160ms var(--ease); }
.cca-iconbtn:active { transform: scale(.93); }
.cca-head .cca-iconbtn:hover { background: rgba(255, 255, 255, .12); }
.cca-iconbtn svg { width: 22px; height: 22px; }
.cca-bar .cca-iconbtn { color: var(--ink-2); }
.cca-bar .cca-iconbtn:hover { background: var(--paper); }
.cca-toggle[aria-pressed="true"] { background: var(--sky-soft); color: var(--royal) !important; }

.cca-bar { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line-2); background: var(--paper); }
.cca-chipbtn { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); cursor: pointer; font-weight: 650; font-size: .9rem; margin-right: auto; }
.cca-chipbtn:hover { border-color: var(--royal); color: var(--royal); }

.cca-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; outline: none; background: var(--white); }
.cca-log:focus-visible { box-shadow: inset 0 0 0 2px var(--sky); }
.cca-msg { display: flex; flex-direction: column; max-width: 88%; }
.cca-msg--user { align-self: flex-end; align-items: flex-end; }
.cca-msg.is-new { animation: cca-in 260ms var(--ease); }
@keyframes cca-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cca-bubble { padding: 11px 14px; border-radius: 18px; line-height: 1.5; font-size: 1rem; overflow-wrap: anywhere; }
.cca-msg--bot .cca-bubble { background: var(--paper); color: var(--ink); border-top-left-radius: 6px; }
.cca-msg--user .cca-bubble { background: var(--royal); color: #fff; border-top-right-radius: 6px; }
.cca-bubble p { margin: 0 0 6px; }
.cca-bubble p:last-child { margin-bottom: 0; }
.cca-bubble strong { color: var(--deep); font-weight: 700; }
.cca-msg--user .cca-bubble strong { color: #fff; }
.cca-list { margin: 4px 0; padding-left: 18px; }
.cca-list li { margin: 3px 0; }
.cca-link { color: var(--royal); }
.cca-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cca-linkbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--royal); color: #fff !important; text-decoration: none; font-weight: 650; font-size: .9rem; border: 0; cursor: pointer; transition: background-color 160ms ease, transform 160ms var(--ease); }
.cca-linkbtn:hover { background: var(--royal-2); }
.cca-linkbtn:active { transform: scale(.96); }
.cca-linkbtn svg { width: 16px; height: 16px; }
.cca-suggest { display: grid; gap: 6px; margin-top: 2px; }
.cca-suggest__btn { text-align: left; min-height: 44px; padding: 10px 14px; border-radius: 14px; border: 1.5px dashed var(--line); background: none; cursor: pointer; color: var(--ink-2); font-size: .95rem; }
.cca-suggest__btn:hover { color: var(--royal); border-color: var(--royal); background: var(--sky-soft); }
.cca-typing .cca-bubble { display: inline-flex; gap: 5px; padding: 14px 16px; }
.cca-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: cca-dot 1s infinite ease-in-out; }
.cca-dot:nth-child(3) { animation-delay: .15s; }
.cca-dot:nth-child(4) { animation-delay: .3s; }
@keyframes cca-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.cca-quick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px; scrollbar-width: none; border-top: 1px solid var(--line-2); background: var(--white); }
.cca-quick::-webkit-scrollbar { display: none; }
.cca-quick__btn { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); cursor: pointer; font-weight: 650; font-size: .9rem; white-space: nowrap; color: var(--ink-2); transition: border-color 160ms ease, color 160ms ease; }
.cca-quick__btn:hover { border-color: var(--royal); color: var(--royal); }
.cca-status { margin: 0; padding: 0 16px; min-height: 0; font-size: .9rem; color: var(--err); }
.cca-status:empty { display: none; }
.cca-form { display: flex; align-items: flex-end; gap: 6px; padding: 8px 12px 8px 16px; background: var(--white); }
.cca-input { flex: 1; min-height: 48px; max-height: 120px; resize: none; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--field); background: var(--white); color: var(--ink); font: 500 1rem/1.35 var(--f-sans); }
.cca-input:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 4px rgba(26, 95, 180, .16); }
.cca-form .cca-iconbtn { color: var(--ink-2); }
.cca-form .cca-iconbtn:hover { background: var(--paper); }
.cca-mic.is-on { background: var(--err) !important; color: #fff !important; animation: cca-pulse 1.4s infinite; }
@keyframes cca-pulse { 50% { box-shadow: 0 0 0 6px rgba(180, 35, 24, .2); } }
.cca-send { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 14px; background: var(--royal); color: #fff; cursor: pointer; flex: none; transition: transform 160ms var(--ease), opacity 160ms ease, background-color 160ms ease; }
.cca-send:hover { background: var(--royal-2); }
.cca-send:active { transform: scale(.93); }
.cca-send:disabled { opacity: .5; cursor: progress; }
.cca-send svg { width: 22px; height: 22px; }
.cca-note { margin: 0; padding: 2px 16px calc(12px + env(safe-area-inset-bottom)); font-size: .8rem; color: var(--ink-3); background: var(--white); }
.cca :focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
	.cca-panel, .cca-launcher { transition: opacity 150ms ease; transform: none !important; }
	.cca-msg.is-new, .cca-dot, .cca-mic.is-on { animation: none; }
}
@media print { .cca { display: none !important; } }
