.hafiz-assistant{position:fixed;inset-inline-end:24px;bottom:90px;z-index:70;font-family:'DM Sans','Noto Sans Arabic',Arial,sans-serif;color:var(--ink);line-height:1.6}.ha-launcher{border:1px solid var(--theme-line);background:var(--x-card);color:var(--ink);border-radius:32px;display:flex;align-items:center;gap:11px;padding:10px 17px 10px 10px;box-shadow:0 10px 35px #0002;font-size:14px;font-weight:500;cursor:pointer;min-height:54px;transition:transform .2s,box-shadow .2s}.ha-launcher:hover{transform:translateY(-3px);box-shadow:0 14px 40px #0003}.ha-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--x-contrast);color:var(--x-on-contrast);font:700 23px/1 'Manrope',sans-serif;letter-spacing:-.06em;flex-shrink:0}.ha-avatar>span{color:inherit;opacity:.55}.ha-launcher-label{display:block;line-height:1.3;text-align:start}.ha-launcher-label small{display:block;font-size:11px;color:var(--muted);margin-top:3px;font-weight:400}.ha-panel{position:absolute;inset-inline-end:0;bottom:68px;width:min(430px,calc(100vw - 32px));height:min(650px,calc(100dvh - 185px));min-height:340px;border:1px solid var(--theme-line);border-radius:17px;background:var(--x-card);box-shadow:0 22px 80px #0004;display:flex;flex-direction:column;overflow:hidden;animation:haReveal .25s ease-out both}.ha-panel[hidden]{display:none!important}.ha-header{padding:18px;display:flex;align-items:center;gap:11px;border-bottom:1px solid var(--theme-line);background:var(--x-soft)}.ha-header h2{font:500 17px/1.4 'DM Sans','Noto Sans Arabic',sans-serif;margin:0;letter-spacing:0}.ha-header p{font-size:12px;line-height:1.5;color:var(--muted);margin:3px 0 0}.ha-header-actions{display:flex;gap:4px;margin-inline-start:auto}.ha-icon{display:grid;place-items:center;width:36px;height:36px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--muted);font-size:20px;cursor:pointer;padding:0}.ha-icon:hover{border-color:var(--theme-line);background:var(--x-soft)}.ha-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5}.ha-messages{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:20px 17px;scroll-behavior:smooth;display:flex;flex-direction:column;gap:15px}.ha-message{max-width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:6px;animation:haReveal .2s ease-out}.ha-message.user{align-items:flex-end}.ha-bubble{font-size:15px;line-height:1.8;overflow-wrap:anywhere;background:var(--x-soft);border:1px solid var(--theme-line);border-radius:2px 13px 13px 13px;padding:13px 15px;max-width:100%;white-space:pre-wrap}.ha-message.user .ha-bubble{background:var(--x-contrast);color:var(--x-on-contrast);border-color:var(--x-contrast);border-radius:13px 2px 13px 13px;max-width:90%}.ha-bubble p{font-size:15px;line-height:1.8;margin:0 0 10px;white-space:pre-wrap}.ha-bubble p:last-child{margin-bottom:0}.ha-bubble h3{font-size:15px;line-height:1.6;font-weight:600;margin:14px 0 8px;letter-spacing:0}.ha-bubble ul{padding-inline-start:19px;margin:0 0 12px}.ha-bubble li{font-size:14px;line-height:1.85;margin-bottom:7px}.ha-meta{font-size:10px;color:var(--muted);line-height:1.5;padding-inline:4px}.ha-sources{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.ha-source{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--theme-line);border-radius:20px;font-size:12px;line-height:1.6;white-space:normal;text-decoration:none;color:var(--ink);background:var(--x-card)}.ha-source:hover{border-color:var(--theme-accent)}.ha-suggestions{display:flex;flex-wrap:wrap;gap:7px;margin-top:5px}.ha-suggestions button{font-family:inherit;font-size:13px;line-height:1.6;color:var(--ink);background:var(--x-card);border:1px solid var(--theme-line);border-radius:18px;padding:8px 12px;text-align:start;cursor:pointer;transition:background .2s}.ha-suggestions button:hover{background:var(--x-soft);border-color:var(--theme-accent)}.ha-form{border-top:1px solid var(--theme-line);padding:13px 15px 11px;background:var(--x-card)}.ha-input-row{display:flex;gap:10px;align-items:end}.ha-input{flex:1;min-width:0;max-height:110px;min-height:48px;resize:vertical;background:var(--x-input);border:1px solid var(--theme-line);border-radius:9px;color:var(--ink);padding:12px;font:15px/1.6 'DM Sans','Noto Sans Arabic',sans-serif}.ha-input::placeholder{color:var(--muted)}.ha-send{width:46px;height:48px;display:grid;place-items:center;flex-shrink:0;border:0;border-radius:9px;background:var(--x-contrast);color:var(--x-on-contrast);cursor:pointer}.ha-send svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8}.ha-send:disabled{opacity:.45;cursor:default}.ha-note{font-size:11px;line-height:1.6;color:var(--muted);margin:9px 0 0}.ha-ai-choice{display:flex;align-items:center;gap:8px;font-size:12px;margin:10px 0 0;color:var(--muted)}.ha-ai-choice input{accent-color:var(--theme-accent);margin:0;width:15px;height:15px}.ha-typing{display:flex;gap:5px;padding:4px 0}.ha-typing i{width:5px;height:5px;border-radius:50%;background:var(--muted);animation:haDot 1s ease-in-out infinite}.ha-typing i:nth-child(2){animation-delay:.15s}.ha-typing i:nth-child(3){animation-delay:.3s}.ha-aria{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.hafiz-assistant button:focus-visible,.hafiz-assistant a:focus-visible,.ha-input:focus-visible{outline:2px solid var(--theme-accent);outline-offset:3px}.ha-panel:focus{outline:none}[dir=rtl] .ha-bubble{border-radius:13px 2px 13px 13px}[dir=rtl] .ha-message.user .ha-bubble{border-radius:2px 13px 13px 13px}[dir=rtl] .ha-launcher{padding:10px 10px 10px 17px}.ha-messages [dir=rtl]{font-family:'Noto Sans Arabic','DM Sans',Arial,sans-serif}
@keyframes haReveal{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:none}}@keyframes haDot{50%{opacity:.3;transform:translateY(-3px)}}
@media(max-width:700px){.hafiz-assistant{inset-inline-end:16px;bottom:78px}.ha-launcher{padding:9px;font-size:13px;min-height:50px}.ha-launcher-label{display:block}.ha-launcher-label small{display:none}.ha-avatar{width:32px;height:32px;font-size:22px}.ha-panel{bottom:62px;width:calc(100vw - 48px);height:min(650px,calc(100dvh - 160px));min-height:250px}.ha-header{padding:15px}.ha-messages{padding:17px 13px}.ha-header h2{font-size:16px}.ha-header p{font-size:11px}.ha-bubble{font-size:15px}.ha-source{font-size:12px}.ha-panel .ha-bubble p{font-size:15px}.ha-panel .ha-bubble li{font-size:14px}.ha-form{padding:12px}.ha-note{font-size:10px}.ha-icon{width:34px;height:34px}.ha-header-actions{gap:0}}
@media(prefers-reduced-motion:reduce){.hafiz-assistant *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.ha-ai-choice[hidden]{display:none!important}
