/* xDoah WhatsApp button + AI assistant. Self-contained (also loads on theme pages). */
.dhc { --dhc-ink: #0b1220; --dhc-blue: #1e5aa8; --dhc-spark: #f2711c; --dhc-line: #dde4ec; font-family: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif; font-size: 15px; line-height: 1.5; color: #1d2635; }
.dhc *, .dhc *::before, .dhc *::after { box-sizing: border-box; }
.dhc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.dhc-stack { position: fixed; right: 18px; bottom: 18px; z-index: 99990; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.dhc-fab { display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 0; cursor: pointer; border-radius: 50%; box-shadow: 0 12px 30px rgba(11,18,32,.3); transition: transform .2s; text-decoration: none; }
.dhc-fab:hover { transform: scale(1.06); }
.dhc-fab:focus-visible, .dhc button:focus-visible, .dhc a:focus-visible, .dhc textarea:focus-visible { outline: 3px solid var(--dhc-spark); outline-offset: 2px; }
.dhc-fab--wa { width: 56px; height: 56px; background: #25d366; color: #fff; }
.dhc-fab--wa svg { width: 30px; height: 30px; }
.dhc-fab--bot { width: 68px; height: 68px; background: var(--dhc-blue); overflow: hidden; border: 3px solid #fff; }
.dhc-fab--bot img { width: 100%; height: 100%; display: block; border-radius: 50%; }
.dhc-launch { position: relative; display: flex; align-items: center; gap: 10px; }
.dhc-bubble { position: relative; background: #fff; color: var(--dhc-ink); font-weight: 600; font-size: 14px; padding: 9px 14px; border-radius: 14px; box-shadow: 0 10px 28px rgba(11,18,32,.18); max-width: 250px; line-height: 1.35; animation: dhc-pop .4s ease 1.2s both; }
.dhc-bubble::after { content: ""; position: absolute; right: -6px; top: 50%; margin-top: -6px; border: 6px solid transparent; border-left-color: #fff; border-right: 0; }
.dhc-bubble[hidden] { display: none; }
@keyframes dhc-pop { from { opacity: 0; transform: translateX(10px) scale(.9); } to { opacity: 1; transform: none; } }
.dhc.is-open .dhc-launch, .dhc.is-open .dhc-fab--wa { display: none; }

.dhc-panel { position: fixed; right: 18px; bottom: 18px; z-index: 99991; width: 380px; max-width: calc(100vw - 24px); height: 580px; max-height: calc(100vh - 36px); display: flex; flex-direction: column; background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(11,18,32,.35); overflow: hidden; animation: dhc-in .22s ease both; }
.dhc-panel[hidden] { display: none; }
@keyframes dhc-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dhc-panel, .dhc-bubble, .dhc-mic.is-on::after, .dhc-dot--rec, .dhc-dot--talk { animation: none; } }
.dhc-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: linear-gradient(120deg, var(--dhc-ink), #16305a); color: #fff; }
.dhc-head__av { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); flex: none; }
.dhc-head__txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dhc-head__txt strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dhc-head__txt span { font-size: 12.5px; color: #b9c6d8; display: inline-flex; align-items: center; gap: 6px; }
.dhc-dot { width: 8px; height: 8px; border-radius: 50%; background: #32d583; box-shadow: 0 0 0 3px rgba(50,213,131,.25); }
.dhc-hbtn { flex: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; font: inherit; }
.dhc-hbtn:hover { background: rgba(255,255,255,.2); }
.dhc-hbtn[hidden] { display: none; }
.dhc-hbtn svg { width: 20px; height: 20px; }
.dhc-lang { font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.dhc-hbtn .dhc-off { display: none; }
.dhc-hbtn[aria-pressed="false"] .dhc-on { display: none; }
.dhc-hbtn[aria-pressed="false"] .dhc-off { display: block; }
.dhc-hbtn[aria-pressed="false"] { color: #ff9b9b; }
.dhc-dot--rec { background: #ff4d4f; box-shadow: 0 0 0 3px rgba(255,77,79,.3); animation: dhc-blink 1s infinite; }
.dhc-dot--talk { background: var(--dhc-spark); box-shadow: 0 0 0 3px rgba(242,113,28,.3); animation: dhc-blink .6s infinite; }
.dhc-say { display: inline-flex; vertical-align: middle; margin-left: 6px; width: 26px; height: 26px; padding: 4px; border: 0; border-radius: 50%; background: #eef3fa; color: var(--dhc-blue); cursor: pointer; }
.dhc-say:hover { background: var(--dhc-blue); color: #fff; }
.dhc-say svg { width: 100%; height: 100%; }
.dhc-mic { position: relative; flex: none; width: 44px; height: 44px; border: 1.5px solid #cfd8e3; border-radius: 12px; background: #fff; color: var(--dhc-blue); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.dhc-mic[hidden] { display: none; }
.dhc-mic svg { width: 22px; height: 22px; }
.dhc-mic:hover { border-color: var(--dhc-blue); }
.dhc-mic.is-on { background: #ff4d4f; border-color: #ff4d4f; color: #fff; }
.dhc-mic.is-on::after { content: ""; position: absolute; inset: -6px; border-radius: 16px; border: 2px solid #ff4d4f; animation: dhc-ring 1.2s ease-out infinite; }
@keyframes dhc-ring { from { opacity: .9; transform: scale(.9); } to { opacity: 0; transform: scale(1.25); } }
.dhc-bubble { cursor: pointer; transition: opacity .25s, transform .25s; }
.dhc-bubble.is-swap { opacity: 0; transform: translateY(4px); }
.dhc-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f3f6f9; }
.dhc-msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; word-wrap: break-word; }
.dhc-msg a { color: var(--dhc-blue); text-decoration: underline; word-break: break-all; }
.dhc-msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--dhc-line); border-bottom-left-radius: 4px; }
.dhc-msg--me { align-self: flex-end; background: var(--dhc-blue); color: #fff; border-bottom-right-radius: 4px; }
.dhc-typing { display: inline-flex; gap: 4px; padding: 14px; }
.dhc-typing i { width: 7px; height: 7px; border-radius: 50%; background: #8a96a8; animation: dhc-blink 1s infinite; }
.dhc-typing i:nth-child(2) { animation-delay: .15s; } .dhc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dhc-blink { 50% { opacity: .25; } }
.dhc-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 12px 0; background: #fff; }
.dhc-chips[hidden] { display: none; }
.dhc-chips button { border: 1px solid #cfd8e3; background: #fff; color: var(--dhc-ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 34px; }
.dhc-chips button:hover { border-color: var(--dhc-blue); color: var(--dhc-blue); }
.dhc-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 12px; background: #fff; border-top: 1px solid var(--dhc-line); }
.dhc-form textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 11px 14px; border: 1.5px solid #cfd8e3; border-radius: 12px; font: inherit; font-size: 15px; color: #1d2635; background: #f8fafc; margin: 0; box-shadow: none; }
.dhc-form textarea:focus { border-color: var(--dhc-blue); outline: none; background: #fff; }
.dhc-send { flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--dhc-spark); color: var(--dhc-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.dhc-send svg { width: 20px; height: 20px; }
.dhc-send[disabled] { opacity: .5; cursor: progress; }
.dhc-wa-link { display: block; padding: 0 12px 12px; background: #fff; font-size: 13px; font-weight: 600; color: #128c4a; text-decoration: none; text-align: center; }
.dhc-wa-link:hover { text-decoration: underline; }

@media (max-width: 520px) {
	.dhc-stack { right: 12px; bottom: 12px; }
	.dhc-fab--bot { width: 60px; height: 60px; }
	.dhc-fab--wa { width: 52px; height: 52px; }
	.dhc-bubble { max-width: 170px; font-size: 12.5px; padding: 7px 11px; }
	.dhc-panel { right: 0; bottom: 0; width: 100%; max-width: 100%; height: 88vh; max-height: 88vh; border-radius: 18px 18px 0 0; }
}
