/* Dominguez CPA website assistant: floating window (desktop) and full screen (phone).
 * A sheet of the firm's paper with its brick and navy, so it reads as part of the site. */
.dda { --dda-w: 400px; font-family: var(--f-ui); color: var(--ink); }
.dda-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:where(.dda) button { font: inherit; color: inherit; }
.dda-launcher { position: fixed; z-index: 80; right: 24px; bottom: 24px; display: none; align-items: center; gap: 10px; min-height: 56px; padding: 0 20px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); color: var(--ink); font-weight: 650; font-size: 1rem; cursor: pointer; box-shadow: 0 18px 40px -16px rgba(50, 18, 4, .55); transition: transform 180ms var(--ease), opacity 180ms ease; }
.dda-launcher:hover { border-color: var(--brick); }
.dda-launcher:active { transform: scale(.96); }
.dda-launcher__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--brick); color: var(--on-brick); }
.dda-launcher__icon svg { width: 22px; height: 22px; }
.dda-launcher__dot { position: absolute; top: 6px; left: 38px; width: 12px; height: 12px; border-radius: 50%; background: var(--navy); box-shadow: 0 0 0 2px var(--sheet); }
.dda.is-open .dda-launcher { transform: scale(.94); opacity: 0; pointer-events: none; }
@media (min-width: 900px) { .dda-launcher { display: inline-flex; } }
body.ddpe-near-foot .dda-launcher { opacity: 0; pointer-events: none; transform: translateY(12px); }

.dda-panel { position: fixed; z-index: 130; inset: 0; display: flex; flex-direction: column; background: var(--paper); padding-top: env(safe-area-inset-top); opacity: 0; transform: translateY(24px); transition: opacity 220ms ease, transform 320ms var(--ease); }
.dda-panel::before { content: ""; position: absolute; z-index: 1; top: 0; left: 0; right: 0; height: 6px; background: var(--brick); border-bottom: 3px double rgba(248, 237, 226, .6); pointer-events: none; }
.dda-panel.is-in { opacity: 1; transform: none; }
.dda-panel[hidden] { display: none; }
html.dda-locked, html.dda-locked body { overflow: hidden; }
@media (min-width: 900px) {
	.dda-panel { inset: auto 24px 24px auto; width: var(--dda-w); height: min(680px, calc(100vh - 48px - var(--adm, 0px))); border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 40px 90px -30px rgba(50, 18, 4, .6), 0 0 0 1px rgba(255, 255, 255, .6) inset; overflow: hidden; transform-origin: bottom right; transform: translateY(12px) scale(.97); padding-top: 0; }
}

.dda-head { display: flex; align-items: center; gap: 12px; padding: 20px 12px 10px 16px; }
.dda-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fff 0, #e3e5e9 40%, #a2a6ae 82%, #757984 100%); color: var(--navy); flex: none; box-shadow: 0 8px 16px -8px rgba(30, 20, 10, .55); }
.dda-mark svg { width: 22px; height: 22px; }
.dda-titles { min-width: 0; flex: 1; }
.dda-title { font: 500 1.3rem/1.15 var(--f-display); color: var(--navy); margin: 0; }
.dda-sub { margin: 3px 0 0; font-size: .86rem; color: var(--ink-2); }
.dda-iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; flex: none; color: var(--ink); transition: background-color 160ms ease, transform 160ms var(--ease); }
.dda-iconbtn:active { transform: scale(.93); }
.dda-iconbtn:hover { background: rgba(31, 26, 22, .07); }
.dda-iconbtn svg { width: 22px; height: 22px; }
.dda-toggle[aria-pressed="true"] { background: rgba(140, 58, 28, .12); color: var(--brick-2); }

.dda-bar { display: flex; align-items: center; gap: 6px; padding: 0 12px 10px 16px; border-bottom: 1px solid var(--line); }
.dda-loc { display: none; }
.dda-chipbtn { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--sheet); cursor: pointer; font-weight: 600; font-size: .9rem; margin-right: auto; }
.dda-chipbtn:hover { border-color: var(--brick); color: var(--brick-2); }

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

.dda-quick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px; scrollbar-width: none; border-top: 1px solid var(--line); }
.dda-quick::-webkit-scrollbar { display: none; }
.dda-quick__btn { flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--sheet); cursor: pointer; font-weight: 600; font-size: .9rem; white-space: nowrap; transition: border-color 160ms ease, color 160ms ease; }
.dda-quick__btn:hover { border-color: var(--brick); color: var(--brick-2); }
.dda-status { margin: 0; padding: 0 16px; min-height: 0; font-size: .9rem; color: var(--brick-2); }
.dda-status:empty { display: none; }
.dda-form { display: flex; align-items: flex-end; gap: 6px; padding: 8px 12px 8px 16px; }
.dda-input { flex: 1; min-height: 46px; max-height: 120px; resize: none; padding: 12px 14px; border-radius: 12px; border: 1px solid #cdbfa9; background: #fffefb; color: var(--ink); font: 400 1rem/1.35 var(--f-ui); }
.dda-input:focus { outline: none; border-color: var(--brick); box-shadow: 0 0 0 3px rgba(140, 58, 28, .18); }
.dda-mic.is-on { background: var(--brick); color: var(--on-brick); animation: dda-pulse 1.4s infinite; }
@keyframes dda-pulse { 50% { box-shadow: 0 0 0 6px rgba(140, 58, 28, .22); } }
.dda-send { display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--brick); color: var(--on-brick); cursor: pointer; flex: none; transition: transform 160ms var(--ease), opacity 160ms ease; }
.dda-send:hover { background: var(--brick-2); }
.dda-send:active { transform: scale(.93); }
.dda-send:disabled { opacity: .5; cursor: progress; }
.dda-send svg { width: 22px; height: 22px; }
.dda-note { margin: 0; padding: 2px 16px calc(12px + env(safe-area-inset-bottom)); font-size: .78rem; line-height: 1.4; color: var(--ink-2); }
.dda :focus-visible { outline: 3px solid var(--brick); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
	.dda-panel, .dda-launcher { transition: opacity 150ms ease; transform: none !important; }
	.dda-msg.is-new, .dda-dot, .dda-mic.is-on { animation: none; }
}
