/* Healix chat assistant */
#hhx { --hhx-lift: 0px; --hhx-deep: var(--deep, #0B2E24); --hhx-acc: var(--accent, #0E6B4F); --hhx-line: var(--line, #DCE3DD); --hhx-tint: var(--tint, #E6EFE9); --hhx-ink: var(--ink, #13211B); --hhx-muted: var(--muted, #55665D); font-family: var(--f-body, system-ui, sans-serif); color: var(--hhx-ink); }
#hhx *, #hhx *::before, #hhx *::after { box-sizing: border-box; }
#hhx [hidden] { display: none !important; }
#hhx .hhx-ic { width: 22px; height: 22px; flex: none; }

#hhx .hhx-fab { position: fixed; right: 18px; bottom: calc(18px + var(--hhx-lift)); z-index: 70; display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .2s ease; }
#hhx .hhx-fab:hover { transform: translateY(-2px); }
#hhx .hhx-fab-l { padding: 11px 16px; border-radius: 999px; background: var(--hhx-deep); color: #fff; font: 600 14px/1 var(--f-body, system-ui, sans-serif); white-space: nowrap; box-shadow: 0 12px 28px -12px rgba(11, 46, 36, .6); }
#hhx .hhx-fab:hover .hhx-fab-l { background: var(--hhx-acc); }
#hhx .hhx-fab-av { position: relative; display: block; width: 68px; height: 68px; flex: none; }
#hhx .hhx-fab-av .hhx-m { width: 100%; height: 100%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--hhx-acc), 0 14px 30px -10px rgba(11, 46, 36, .55); }
#hhx .hhx-fab-av::before, #hhx .hhx-fab-av::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: rgba(34, 197, 94, .42); box-shadow: 0 0 0 2px rgba(34, 197, 94, .5); pointer-events: none; animation: hhx-ripple 3s cubic-bezier(.2, .6, .35, 1) infinite; }
#hhx .hhx-fab-av::after { animation-delay: 1.5s; }
@keyframes hhx-ripple { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.55); opacity: 0; } }
#hhx .hhx-fab-av .hhx-m { animation: hhx-glow 3s ease-in-out infinite; }
@keyframes hhx-glow { 0%, 100% { box-shadow: 0 0 0 2px var(--hhx-acc), 0 0 10px 1px rgba(34, 197, 94, .35), 0 14px 30px -10px rgba(11, 46, 36, .55); } 50% { box-shadow: 0 0 0 2px #22C55E, 0 0 22px 6px rgba(34, 197, 94, .6), 0 14px 30px -10px rgba(11, 46, 36, .55); } }
#hhx .hhx-fab-dot { position: absolute; right: 3px; bottom: 4px; width: 14px; height: 14px; border-radius: 50%; background: #22C55E; border: 2.5px solid #fff; }

/* Mascot */
#hhx .hhx-m { position: relative; display: block; border-radius: 50%; overflow: hidden; background: #ddd5cc; isolation: isolate; }
#hhx .hhx-m img, #hhx .hhx-m svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: none; }
#hhx .hhx-m-hand { transform-origin: 18.9% 81.1%; animation: hhx-wave 4.6s ease-in-out infinite; }
@keyframes hhx-wave { 0%, 56%, 100% { transform: rotate(0); } 10% { transform: rotate(14deg); } 20% { transform: rotate(-7deg); } 30% { transform: rotate(12deg); } 40% { transform: rotate(-5deg); } 50% { transform: rotate(4deg); } }
#hhx .hhx-iris { animation: hhx-look 8s cubic-bezier(.3, 0, .2, 1) infinite; }
@keyframes hhx-look { 0%, 14% { transform: translate(0, 0); } 17%, 31% { transform: translate(-36px, 4px); } 34%, 41% { transform: translate(0, 0); } 44%, 57% { transform: translate(34px, -3px); } 60%, 65% { transform: translate(22px, -14px); } 68%, 100% { transform: translate(0, 0); } }
#hhx .hhx-lid { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); animation: hhx-blink 4.2s ease-in-out infinite; }
@keyframes hhx-blink { 0%, 89%, 100% { transform: scaleY(0); } 93% { transform: scaleY(1); } 96% { transform: scaleY(.05); } }
#hhx .hhx-fab:focus-visible, #hhx button:focus-visible, #hhx a:focus-visible, #hhx .hhx-in:focus-visible { outline: 3px solid color-mix(in srgb, var(--hhx-acc) 45%, transparent); outline-offset: 2px; }
#hhx.is-open .hhx-fab { opacity: 0; pointer-events: none; transform: scale(.9); }

#hhx .hhx-panel { position: fixed; right: 20px; bottom: calc(20px + var(--hhx-lift)); z-index: 71; width: min(390px, calc(100vw - 32px)); height: min(620px, calc(100vh - 40px - var(--hhx-lift))); display: flex; flex-direction: column; background: var(--surface, #fff); border: 1px solid var(--hhx-line); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 70px -24px rgba(11, 46, 36, .45); animation: hhx-in .22s ease-out; }
@keyframes hhx-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

#hhx .hhx-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; background: var(--hhx-deep); color: var(--deep-ink, #E9F0EB); }
#hhx .hhx-av { display: block; width: 42px; height: 42px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .28); }
#hhx .hhx-av .hhx-m { width: 100%; height: 100%; }
#hhx .hhx-ht { flex: 1; min-width: 0; }
#hhx .hhx-title { margin: 0; font: 700 17px/1.1 var(--f-head, system-ui, sans-serif); color: #fff; letter-spacing: .01em; }
#hhx .hhx-sub { margin: 3px 0 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--deep-muted, #A9BFB3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hhx .hhx-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; flex: none; }
#hhx .hhx-tool { height: 30px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: transparent; color: #fff; font: 600 12px/1 var(--f-body, system-ui, sans-serif); cursor: pointer; white-space: nowrap; }
#hhx .hhx-tool:hover { background: rgba(255, 255, 255, .1); }
#hhx .hhx-close { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
#hhx .hhx-close:hover { background: rgba(255, 255, 255, .1); }

#hhx .hhx-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: var(--bg, #F5F6F2); overscroll-behavior: contain; }
#hhx .hhx-row { display: flex; margin: 0 0 10px; }
#hhx .hhx-row.is-me { justify-content: flex-end; }
#hhx .hhx-b { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
#hhx .is-bot .hhx-b { background: var(--surface, #fff); border: 1px solid var(--hhx-line); border-start-start-radius: 6px; }
#hhx .is-me .hhx-b { background: var(--hhx-acc); color: #fff; border-start-end-radius: 6px; }
#hhx .hhx-b[dir="rtl"], #hhx .hhx-p[dir="rtl"] { font-size: 15.5px; line-height: 1.8; }
#hhx .hhx-p { margin: 0 0 6px; }
#hhx .hhx-p:last-child { margin-bottom: 0; }
#hhx .hhx-note { margin: 8px 0 0; padding: 7px 9px; border-radius: 10px; background: var(--hhx-tint); color: var(--hhx-muted); font-size: 12.5px; line-height: 1.45; }
#hhx .hhx-src { margin: 8px 0 0; font-size: 12px; color: var(--hhx-muted); }
#hhx .hhx-src a { color: var(--hhx-acc); }
#hhx .hhx-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
#hhx .hhx-a { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; line-height: 1.2; }
#hhx .hhx-a-primary { background: var(--hhx-acc); color: #fff; }
#hhx .hhx-a-primary:hover { background: var(--accent-hover, #0B5940); }
#hhx .hhx-a-wa { background: #1FA855; color: #fff; }
#hhx .hhx-a-wa:hover { background: #178a45; }
#hhx .hhx-a-link { border: 1px solid var(--hhx-line); color: var(--hhx-acc); background: var(--surface, #fff); }
#hhx .hhx-a-link:hover { border-color: var(--hhx-acc); }

#hhx .hhx-typing { display: inline-flex; gap: 4px; padding: 13px 14px; }
#hhx .hhx-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--hhx-muted); opacity: .4; animation: hhx-bl 1.1s infinite ease-in-out; }
#hhx .hhx-typing span:nth-child(2) { animation-delay: .15s; }
#hhx .hhx-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes hhx-bl { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

#hhx .hhx-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 10px; background: var(--bg, #F5F6F2); }
#hhx .hhx-chip { padding: 7px 12px; border: 1px solid var(--hhx-line); border-radius: 999px; background: var(--surface, #fff); color: var(--hhx-ink); font: 500 13px/1.2 var(--f-body, system-ui, sans-serif); cursor: pointer; }
#hhx .hhx-chip:hover { border-color: var(--hhx-acc); color: var(--hhx-acc); }
#hhx .hhx-qr { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
#hhx .hhx-qr .hhx-chip { background: var(--hhx-tint); border-color: transparent; color: var(--hhx-acc); font-weight: 600; }

#hhx .hhx-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--hhx-line); background: var(--surface, #fff); }
#hhx .hhx-in { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--hhx-line); border-radius: 999px; background: var(--bg, #F5F6F2); color: var(--hhx-ink); font: 400 16px/1 var(--f-body, system-ui, sans-serif); }
#hhx .hhx-in:focus { border-color: var(--hhx-acc); outline: none; background: #fff; }
#hhx .hhx-send { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--hhx-acc); color: #fff; cursor: pointer; flex: none; }
#hhx .hhx-send:hover { background: var(--accent-hover, #0B5940); }
#hhx [dir="rtl"] .hhx-send .hhx-ic { transform: scaleX(-1); }
#hhx .hhx-foot { margin: 0; padding: 0 14px 10px; background: var(--surface, #fff); font-size: 11px; line-height: 1.4; color: var(--hhx-muted); text-align: center; }

@media (max-width: 767px) {
	#hhx .hhx-fab { right: 14px; }
	#hhx .hhx-fab-av { width: 60px; height: 60px; }
	#hhx .hhx-fab-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	#hhx .hhx-panel { right: 0; left: 0; bottom: 0; width: 100%; height: min(86vh, calc(100dvh - 40px)); border-radius: 20px 20px 0 0; border-bottom: 0; z-index: 80; }
	#hhx .hhx-form { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
	#hhx .hhx-tool { padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) { #hhx * { animation: none !important; transition: none !important; } }
@media print { #hhx { display: none !important; } }