/* Hawyat AI assistant panel (the CRM's dark navy panel and glowing blue orb; voice input, text replies only). Scoped to #hw-assistant,
   so it never restyles the panels it sits on. Fonts: the page's own (Readex Pro / IBM Plex Sans Arabic on Hawyat). */
#hw-assistant { --hw-navy: #081329; --hw-ink: #e2e8f0; --hw-muted: #94a3b8; --hw-sky: #38bdf8; --hw-blue: #3b82f6; font-family: "Readex Pro", "IBM Plex Sans Arabic", Tahoma, system-ui, sans-serif; }
#hw-assistant input, #hw-assistant button { font-family: inherit; }
#hw-assistant * { box-sizing: border-box; }
#hw-assistant button { cursor: pointer; }
.hw-launch { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 1040; width: 54px; height: 54px; border: 0; border-radius: 9999px; color: #fff;
  background: radial-gradient(circle at 35% 30%, #7dd3fc, #2563eb 55%, #0b1a3a); box-shadow: 0 0 22px rgba(59, 130, 246, .7); display: flex; align-items: center; justify-content: center; }
.hw-launch:hover { filter: brightness(1.1); }
.hw-panel { position: fixed; z-index: 1050; inset-inline: 0; bottom: 0; height: 78vh; display: flex; flex-direction: column; color: var(--hw-ink);
  background: linear-gradient(180deg, #0d1d40, var(--hw-navy) 45%, #040a1a); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .45); font-size: 14px; line-height: 1.6; }
@media (min-width: 1024px) {
  .hw-panel { inset-inline: auto 0; top: 0; height: auto; width: 400px; border-radius: 0; border-inline-start: 1px solid rgba(255, 255, 255, .1); }
  html.hw-assistant-open body { padding-inline-end: 400px; }
}
.hw-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.hw-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.hw-title svg { color: var(--hw-sky); }
.hw-title small { font-size: 10px; padding: 1px 6px; border-radius: 9999px; background: rgba(251, 191, 36, .15); color: #fde68a; font-weight: 500; }
.hw-tools { display: flex; gap: 6px; }
.hw-tools button { background: none; border: 0; color: var(--hw-muted); padding: 4px; border-radius: 8px; }
.hw-tools button:hover, .hw-tools button[aria-pressed="true"] { color: #fff; background: rgba(255, 255, 255, .06); }
.hw-fine { font-size: 10px; color: #64748b; margin: 6px 0 0; }
.hw-legal { padding: 0 16px 10px; margin: 0; }
.hw-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.hw-stage { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 16px 16px; }
.hw-orb { --lvl: 0; position: relative; width: 150px; height: 150px; border-radius: 9999px; cursor: pointer; outline: none;
  background: radial-gradient(circle at 34% 28%, #e0f2fe 0%, #7dd3fc 13%, #3b82f6 42%, #1d4ed8 64%, #172554 88%, #0b1a3a 100%);
  box-shadow: 0 0 calc(36px + var(--lvl) * 70px) calc(6px + var(--lvl) * 22px) rgba(59, 130, 246, .55), inset 0 0 42px rgba(191, 219, 254, .35);
  transform: scale(calc(1 + var(--lvl) * .14)); transition: transform .08s linear, box-shadow .08s linear; }
.hw-orb:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 40px 10px rgba(59, 130, 246, .6); }
.hw-orb::before, .hw-orb::after { content: ""; position: absolute; inset: -14px; border-radius: 9999px; border: 2px solid rgba(96, 165, 250, .35); pointer-events: none; }
.hw-core { position: absolute; inset: 9%; border-radius: 9999px; background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, .35), transparent 35%, rgba(56, 189, 248, .35), transparent 70%);
  mix-blend-mode: screen; animation: hw-spin 7s linear infinite; }
.hw-off .hw-orb { filter: saturate(.75) brightness(.85); animation: hw-breathe 4s ease-in-out infinite; }
.hw-off .hw-orb::after, .hw-thinking .hw-orb::after { display: none; }
.hw-listening .hw-orb::before { animation: hw-ring 1.6s ease-out infinite; }
.hw-listening .hw-orb::after { animation: hw-ring 1.6s ease-out .8s infinite; }
.hw-thinking .hw-orb { animation: hw-breathe 1.3s ease-in-out infinite; }
.hw-thinking .hw-orb::before { inset: -12px; border: 3px solid transparent; border-top-color: #38bdf8; border-right-color: #818cf8; animation: hw-spin .9s linear infinite; }
.hw-thinking .hw-core { animation-duration: 1.6s; }
@keyframes hw-ring { from { transform: scale(1); opacity: .85; } to { transform: scale(1.5); opacity: 0; } }
@keyframes hw-spin { to { transform: rotate(360deg); } }
@keyframes hw-breathe { 50% { transform: scale(1.045); } }
@keyframes hw-talk { from { transform: scale(1); box-shadow: 0 0 40px 8px rgba(59, 130, 246, .5); } to { transform: scale(1.08); box-shadow: 0 0 95px 26px rgba(56, 189, 248, .72); } }
@media (prefers-reduced-motion: reduce) { .hw-orb, .hw-orb::before, .hw-orb::after, .hw-core { animation: none !important; } }
.hw-status { margin: 0; color: #bae6fd; font-size: 14px; }
.hw-error { padding: 8px; border-radius: 10px; font-size: 12px; background: rgba(239, 68, 68, .15); color: #fecaca; }
.hw-confirm { padding: 10px; border-radius: 12px; background: rgba(14, 165, 233, .12); box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .35); }
.hw-confirm p { margin: 0 0 6px; }
.hw-confirm a { color: #7dd3fc; font-size: 12px; }
.hw-confirm div { display: flex; gap: 8px; margin-top: 8px; }
.hw-confirm button { border: 0; border-radius: 9999px; padding: 6px 16px; background: rgba(255, 255, 255, .1); color: #fff; }
.hw-confirm button[data-hw="confirm"] { background: #0ea5e9; }
.hw-confirm button:disabled { opacity: .5; }
.hw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hw-chips button { border: 0; border-radius: 9999px; padding: 4px 12px; background: rgba(255, 255, 255, .08); color: var(--hw-ink); font-size: 12px; }
.hw-progress { padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .2); font-size: 12px; }
.hw-progress > div { display: flex; justify-content: space-between; margin-bottom: 6px; }
.hw-progress > i { display: block; height: 5px; border-radius: 9999px; background: linear-gradient(90deg, #38bdf8, #3b82f6); transition: width .7s; margin-bottom: 8px; }
.hw-progress ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.hw-progress li { padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .05); color: var(--hw-muted); font-size: 11px; }
.hw-progress li.ok { background: rgba(14, 165, 233, .15); color: #e0f2fe; }
.hw-results { display: flex; flex-direction: column; gap: 6px; }
.hw-item { display: block; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); color: var(--hw-ink); text-decoration: none; font-size: 12px; }
a.hw-item:hover { background: rgba(255, 255, 255, .1); }
.hw-item b { display: block; color: #f1f5f9; font-weight: 600; }
.hw-item span { color: var(--hw-muted); }
.hw-turns { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 0 16px 12px; }
.hw-turn { max-width: 85%; }
.hw-turn > div { padding: 8px 12px; border-radius: 16px; font-size: 14px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); white-space: pre-wrap; }
.hw-turn.user { margin-inline-start: auto; }
.hw-turn.user > div { background: rgba(2, 132, 199, .8); color: #fff; box-shadow: none; }
.hw-raw, .hw-ai { margin: 2px 4px 0; font-size: 10px; }
.hw-raw { color: rgba(253, 230, 138, .85); }
.hw-ai { color: rgba(186, 230, 253, .85); }
.hw-hint { text-align: center; font-size: 12px; color: var(--hw-muted); }
.hw-foot { display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .1); }
.hw-foot input { flex: 1; height: 40px; min-width: 0; border-radius: 9999px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); color: var(--hw-ink); padding: 0 16px; font: inherit; font-size: 14px; }
.hw-foot input::placeholder { color: #64748b; }
.hw-foot input:focus { outline: none; border-color: var(--hw-sky); }
.hw-send, .hw-stop { width: 40px; height: 40px; border: 0; border-radius: 9999px; display: flex; align-items: center; justify-content: center; color: #fff; background: #0ea5e9; flex-shrink: 0; }
.hw-send:disabled { opacity: .4; }
.hw-stop { background: rgba(239, 68, 68, .85); }
@media print { #hw-assistant { display: none !important; } }
/* the field the assistant just filled (New order form) */
.hw-ai-filled { outline: 2px solid #38bdf8; outline-offset: 3px; border-radius: 8px; transition: outline-color .3s; }
.hw-setup { margin: 0 16px 12px; padding: 8px 10px; border-radius: 10px; font-size: 11px; line-height: 1.7; background: rgba(56, 189, 248, .08); color: #bae6fd; box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .2); }
.hw-setup a { color: #7dd3fc; text-decoration: underline; }

/* voice input, text replies (owner 2026-10-30) */
.hw-orb { display: flex; align-items: center; justify-content: center; }
.hw-mic { position: relative; color: #e0f2fe; opacity: .9; }
.hw-mic svg { width: 40px; height: 40px; }
.hw-orb-off { filter: grayscale(.7) brightness(.7); cursor: default; }
.hw-heard { margin: 0 4px 2px; font-size: 10px; color: #bae6fd; display: flex; align-items: center; gap: 4px; }
.hw-heard svg { width: 12px; height: 12px; }
.hw-understood { margin: 3px 4px 0; font-size: 11px; color: #7dd3fc; }
/* website pages with the phone action bar (Book / Call): the launcher sits above it */
@media (max-width: 639.98px) { body:has(.s-actionbar) .hw-launch { bottom: 100px; } }
