/* Enjaz Law AI assistant: dark navy panel, glowing orb (scoped to #ej-assistant; never restyles the app). */
#ej-assistant { --ej-navy: #081329; --ej-ink: #e2e8f0; --ej-muted: #94a3b8; --ej-sky: #38bdf8; --ej-gold: #d4b46a; font-family: "IBM Plex Sans Arabic", Tahoma, system-ui, sans-serif; }
#ej-assistant *, #ej-assistant *::before, #ej-assistant *::after { box-sizing: border-box; }
#ej-assistant button, #ej-assistant input { font-family: inherit; }
#ej-assistant button { cursor: pointer; }
.ej-launch { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 1040; width: 56px; height: 56px; 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, .65); display: flex; align-items: center; justify-content: center; }
.ej-launch svg { width: 24px; height: 24px; }
.ej-launch:hover { filter: brightness(1.12); }
.ej-launch:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ej-panel { position: fixed; z-index: 1050; inset-inline: 0; bottom: 0; height: 82vh; height: 82dvh; display: flex; flex-direction: column; color: var(--ej-ink);
  background: linear-gradient(180deg, #0d1d40, var(--ej-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.65; }
@media (min-width: 1024px) {
  .ej-panel { inset-inline: auto 0; top: 0; height: auto; width: 410px; border-radius: 0; border-inline-start: 1px solid rgba(255, 255, 255, .1); }
  html.ej-assistant-open body { padding-inline-end: 410px; }
}
.ej-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.ej-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ej-title svg { color: var(--ej-sky); }
.ej-title small { font-size: 10px; padding: 1px 8px; border-radius: 9999px; background: rgba(212, 180, 106, .16); color: #f3e3b5; font-weight: 500; }
.ej-tools { display: flex; gap: 4px; }
.ej-tools button, .ej-tools a { background: none; border: 0; color: var(--ej-muted); padding: 6px; border-radius: 8px; display: inline-flex; }
.ej-tools button:hover, .ej-tools a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.ej-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.ej-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 16px 6px; }
.ej-orb { --lvl: 0; position: relative; width: 112px; height: 112px; border-radius: 9999px; cursor: pointer; outline: none; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: radial-gradient(circle at 34% 28%, #e0f2fe 0%, #7dd3fc 13%, #3b82f6 42%, #1d4ed8 64%, #172554 88%, #0b1a3a 100%);
  box-shadow: 0 0 36px 6px rgba(59, 130, 246, .5), inset 0 0 36px rgba(191, 219, 254, .35); }
.ej-orb:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 40px 10px rgba(59, 130, 246, .6); }
.ej-orb::before, .ej-orb::after { content: ""; position: absolute; inset: -12px; border-radius: 9999px; border: 2px solid rgba(96, 165, 250, .35); pointer-events: none; }
.ej-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: ej-spin 7s linear infinite; }
.ej-mic { position: relative; color: #e0f2fe; display: flex; }
.ej-mic svg { width: 34px; height: 34px; }
.ej-off .ej-orb { animation: ej-breathe 4s ease-in-out infinite; }
.ej-off .ej-orb::after { display: none; }
.ej-listening .ej-orb::before { animation: ej-ring 1.6s ease-out infinite; }
.ej-listening .ej-orb::after { animation: ej-ring 1.6s ease-out .8s infinite; }
.ej-busy .ej-orb::before { inset: -10px; border: 3px solid transparent; border-top-color: #38bdf8; border-right-color: #818cf8; animation: ej-spin .9s linear infinite; }
.ej-orb-off { filter: grayscale(.7) brightness(.7); cursor: default; }
@keyframes ej-ring { from { transform: scale(1); opacity: .85; } to { transform: scale(1.5); opacity: 0; } }
@keyframes ej-spin { to { transform: rotate(360deg); } }
@keyframes ej-breathe { 50% { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .ej-orb, .ej-orb::before, .ej-orb::after, .ej-core { animation: none !important; } }
.ej-status { margin: 0; color: #bae6fd; font-size: 13px; text-align: center; }
.ej-live { margin: 0 16px; padding: 8px 12px; border-radius: 12px; background: rgba(56, 189, 248, .1); color: #e0f2fe; font-size: 14px; text-align: center; min-height: 38px; width: calc(100% - 32px); }
.ej-error { margin: 0 16px; padding: 8px 10px; border-radius: 10px; font-size: 12px; background: rgba(239, 68, 68, .15); color: #fecaca; }
.ej-turns { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.ej-turn { max-width: 92%; display: flex; flex-direction: column; gap: 6px; }
.ej-user { margin-inline-start: auto; align-items: flex-end; }
.ej-bubble { padding: 8px 12px; border-radius: 16px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); white-space: pre-wrap; overflow-wrap: anywhere; }
.ej-user .ej-bubble { background: rgba(2, 132, 199, .85); color: #fff; box-shadow: none; }
.ej-heard { margin: 0 4px; font-size: 10px; color: #bae6fd; display: flex; align-items: center; gap: 4px; }
.ej-heard svg { width: 12px; height: 12px; }
.ej-meta { margin: 0 4px; font-size: 10px; color: #64748b; }
.ej-table { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.ej-row { display: grid; grid-template-columns: 1fr; gap: 1px; padding: 8px 12px; background: rgba(255, 255, 255, .04); color: var(--ej-ink); text-decoration: none; font-size: 12px; border-top: 1px solid rgba(255, 255, 255, .06); }
.ej-row:first-child { border-top: 0; }
a.ej-row:hover { background: rgba(56, 189, 248, .12); }
.ej-t { font-weight: 600; color: #f1f5f9; overflow-wrap: anywhere; }
.ej-s { color: var(--ej-muted); overflow-wrap: anywhere; }
.ej-open { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #7dd3fc; text-decoration: none; padding: 4px 10px; border-radius: 9999px; background: rgba(56, 189, 248, .1); }
.ej-open svg { width: 14px; height: 14px; }
.ej-open:hover { background: rgba(56, 189, 248, .2); }
.ej-chips, .ej-hints { display: flex; flex-wrap: wrap; gap: 6px; }
.ej-hints { justify-content: center; padding-top: 6px; }
.ej-chips button, .ej-hints button { border: 0; border-radius: 9999px; padding: 5px 12px; background: rgba(255, 255, 255, .08); color: var(--ej-ink); font-size: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.ej-chips button:hover, .ej-hints button:hover { background: rgba(56, 189, 248, .18); }
.ej-confirm { margin: 0 16px; padding: 12px; border-radius: 12px; background: rgba(14, 165, 233, .12); box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .4); }
.ej-confirm p { margin: 0 0 8px; }
.ej-confirm div { display: flex; gap: 8px; }
.ej-confirm button { border: 0; border-radius: 9999px; padding: 6px 18px; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; }
.ej-confirm button[data-ej="yes"] { background: #0ea5e9; }
.ej-confirm button:disabled { opacity: .5; }
.ej-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid rgba(255, 255, 255, .1); }
.ej-foot input { flex: 1; height: 42px; min-width: 0; border-radius: 9999px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); color: var(--ej-ink); padding: 0 16px; font-size: 14px; }
.ej-foot input::placeholder { color: #64748b; }
.ej-foot input:focus { outline: none; border-color: var(--ej-sky); }
.ej-send { width: 42px; height: 42px; border: 0; border-radius: 9999px; display: flex; align-items: center; justify-content: center; color: #fff; background: #0ea5e9; flex-shrink: 0; }
.ej-send:disabled { opacity: .4; }
.ej-fine { margin: 0; padding: 0 16px 10px; font-size: 10px; color: #64748b; }
@media print { #ej-assistant { display: none !important; } }
