/* Hello Dukaan — AI Voice Assistant */
.hdai-fab, .hdai-panel { --hg: var(--g, #0b7a4b); --hg2: var(--g2, #08653d); --hgl: var(--gl, #e6f4ed); --hink: var(--ink, #14201b); --hmut: var(--muted, #63726b); --hline: var(--line, #e2e8e5); font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

.hdai-fab { position: fixed; right: 20px; bottom: 92px; z-index: 99998; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 14px; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--hg), var(--hg2)); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 6px 20px rgba(11, 122, 75, .35); transition: transform .15s; }
.hdai-fab:hover { transform: translateY(-2px); }
.hdai-fab.hide { display: none !important; }
.hdai-fab svg { animation: hdai-pulse 2.4s infinite; border-radius: 50%; }
@keyframes hdai-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .5); } 50% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } }

.hdai-panel { position: fixed; right: 20px; bottom: 20px; z-index: 99999; width: 390px; max-width: calc(100vw - 24px); height: min(640px, calc(100vh - 40px)); display: none; flex-direction: column; background: #fff; color: var(--hink); border-radius: 18px; box-shadow: 0 18px 50px rgba(16, 24, 20, .25); overflow: hidden; border: 1px solid var(--hline); }
.hdai-panel.open { display: flex; }
.hdai-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 12px 16px; background: linear-gradient(135deg, var(--hg), var(--hg2)); color: #fff; }
.hdai-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.hdai-title b { font-size: 15px; }
.hdai-title small { opacity: .85; font-size: 12px; }
.hdai-tools { display: flex; align-items: center; gap: 4px; }
.hdai-ico { width: 32px; height: 32px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .15); color: #fff; font-size: 15px; cursor: pointer; }
.hdai-ico.on { background: #fff; color: var(--hg); }
.hdai-script { height: 32px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .15); color: #fff; font-size: 12px; padding: 0 4px; cursor: pointer; }
.hdai-script option { color: #111; }

.hdai-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #f7f9f8; }
.hdai-msg { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.hdai-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--hline); border-bottom-left-radius: 4px; }
.hdai-msg.me { align-self: flex-end; background: var(--hg); color: #fff; border-bottom-right-radius: 4px; }
.hdai-msg.err { background: #fdecea; border-color: #f5c6c0; color: #8c2a1f; }
.hdai-card { align-self: stretch; background: var(--hgl); border: 1px solid rgba(11, 122, 75, .2); border-radius: 12px; padding: 9px 12px; font-size: 13px; line-height: 1.5; }
.hdai-card.warn { background: #fff3e2; border-color: #f0d3a6; }
.hdai-card .skip { color: #8a5a10; }
.hdai-card .row { display: flex; gap: 8px; margin-top: 8px; }
.hdai-undo { margin-top: 6px; border: 1px solid var(--hline); background: #fff; color: var(--hink); border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.hdai-undo.danger { background: #c0392b; border-color: #c0392b; color: #fff; }
.hdai-undo:disabled { opacity: .55; cursor: default; }

.hdai-chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 0; background: #fff; scrollbar-width: none; }
.hdai-chip { flex: none; border: 1px solid var(--hline); background: #fff; border-radius: 999px; padding: 6px 11px; font-size: 12.5px; cursor: pointer; color: var(--hink); }
.hdai-chip:hover { border-color: var(--hg); color: var(--hg); }
.hdai-status { min-height: 18px; padding: 4px 14px 0; font-size: 12px; color: var(--hmut); background: #fff; }
.hdai-status.live { color: #c0392b; font-weight: 600; }

.hdai-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px 12px; background: #fff; }
.hdai-mic { --lvl: 0; flex: none; width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--hg); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 calc(var(--lvl) * 14px) rgba(11, 122, 75, .18); transition: box-shadow .08s, background .2s; }
.hdai-panel.listening .hdai-mic { background: #c0392b; box-shadow: 0 0 0 calc(4px + var(--lvl) * 16px) rgba(192, 57, 43, .2); }
.hdai-panel.busy .hdai-mic { opacity: .5; pointer-events: none; }
.hdai-panel.speaking .hdai-title small::after { content: " · bol raha hoon 🔊"; }
.hdai-form { flex: 1; display: flex; align-items: center; border: 1px solid var(--hline); border-radius: 999px; padding: 0 4px 0 14px; min-width: 0; }
.hdai-form input { flex: 1; min-width: 0; border: 0; outline: 0; height: 42px; font-size: 14px; background: transparent; color: var(--hink); }
.hdai-send { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--hgl); color: var(--hg); font-size: 15px; cursor: pointer; }

@media (max-width: 640px) {
	.hdai-fab { bottom: var(--hdai-moff, 156px); right: 14px; height: 46px; }
	.hdai-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 88vh; height: 88dvh; border-radius: 18px 18px 0 0; }
}
@media print { .hdai-fab, .hdai-panel { display: none !important; } }
