
/* ---------- Extruck Havin live call (Gemini) ---------- */
.hv-live { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); background: radial-gradient(120% 80% at 50% 0%, rgba(245,158,11,.22), transparent 60%), rgba(6,7,10,.82); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); font-family: Vazirmatn, Tahoma, sans-serif; direction: rtl; color: #f5f5f7; --hv-level: 0; animation: hv-in .28s cubic-bezier(.2,.8,.2,1); }
.hv-live[hidden] { display: none; }
.hv-card { position: relative; width: min(420px, 100%); max-height: 100%; min-height: min(640px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 16px; border-radius: 28px; background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08); overflow: hidden; }
.hv-head { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: rgba(245,245,247,.7); }
.hv-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: hv-dot 1.6s infinite; }
.hv-timer { margin-inline-start: auto; font-variant-numeric: tabular-nums; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.07); }
.hv-stage { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px 0 4px; text-align: center; }
.hv-avatar { position: relative; width: 168px; height: 168px; display: grid; place-items: center; margin-bottom: 6px; }
.hv-face { position: relative; z-index: 2; width: 124px; height: 124px; border-radius: 50%; display: grid; place-items: center; color: #fde68a; background: radial-gradient(circle at 30% 25%, #334155, #0f172a 45%, #020617); box-shadow: 0 18px 50px rgba(15,23,42,.55), inset 0 2px 0 rgba(255,255,255,.18); transform: scale(calc(1 + var(--hv-level) * .07)); transition: transform 80ms linear; }
.hv-face svg { width: 62px; height: 62px; }
.hv-wave { position: absolute; inset: 22px; border-radius: 50%; border: 2px solid rgba(245,158,11,.55); opacity: 0; }
.hv-live[data-mode="speak"] .hv-wave, .hv-live[data-mode="connect"] .hv-wave { animation: hv-ring 2.2s cubic-bezier(.2,.7,.3,1) infinite; }
.hv-live[data-mode="speak"] .hv-wave:nth-child(2), .hv-live[data-mode="connect"] .hv-wave:nth-child(2) { animation-delay: .7s; }
.hv-live[data-mode="speak"] .hv-wave:nth-child(3), .hv-live[data-mode="connect"] .hv-wave:nth-child(3) { animation-delay: 1.4s; }
.hv-live[data-mode="listen"] .hv-wave:first-child { opacity: calc(.2 + var(--hv-level) * .8); transform: scale(calc(1.05 + var(--hv-level) * .3)); border-color: rgba(255,255,255,.35); transition: transform 80ms linear, opacity 80ms linear; }
.hv-name { font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; }
.hv-status { min-height: 1.7em; font-size: .95rem; color: rgba(245,245,247,.72); }
.hv-vpn-note { margin: 2px 0 0; max-width: 28ch; font-size: .75rem; line-height: 1.7; color: rgba(245,245,247,.48); }
.hv-live[data-mode="speak"] .hv-status { color: #fcd34d; }
.hv-live[data-mode="error"] .hv-status { color: #fca5a5; max-width: 30ch; line-height: 1.8; }
.hv-bars { display: flex; align-items: center; gap: 4px; height: 26px; opacity: 0; transition: opacity .2s; }
.hv-live[data-mode="speak"] .hv-bars, .hv-live[data-mode="listen"] .hv-bars { opacity: 1; }
.hv-bars i { width: 4px; border-radius: 4px; background: #f59e0b; height: calc(6px + var(--hv-level) * 20px); transition: height 90ms linear; }
.hv-live[data-mode="listen"] .hv-bars i { background: rgba(255,255,255,.55); }
.hv-bars i:nth-child(2), .hv-bars i:nth-child(6) { height: calc(6px + var(--hv-level) * 14px); }
.hv-bars i:nth-child(1), .hv-bars i:nth-child(7) { height: calc(5px + var(--hv-level) * 8px); }
.hv-bars i:nth-child(4) { height: calc(7px + var(--hv-level) * 24px); }
.hv-pick { text-align: center; padding: 4px 0 8px; }
.hv-pick[hidden] { display: none; }
.hv-pick p { margin: 0 0 12px; font-size: .9rem; color: rgba(245,245,247,.75); }
.hv-pick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hv-pick-btn { appearance: none; font: inherit; font-weight: 700; font-size: 1rem; color: #fff; min-height: 56px; border-radius: 18px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); cursor: pointer; transition: transform .15s, background .2s, border-color .2s; }
.hv-pick-btn.is-pref { background: linear-gradient(180deg, #fbbf24, #d97706); color: #0f172a; border-color: transparent; box-shadow: 0 10px 28px rgba(245,158,11,.35); }
.hv-pick-btn:hover { border-color: rgba(245,158,11,.7); }
.hv-pick-btn:active { transform: scale(.97); }
.hv-pick-btn:focus-visible, .hv-btn:focus-visible, .hv-caps summary:focus-visible { outline: 2px solid #fcd34d; outline-offset: 3px; }
.hv-live.is-picking .hv-bar, .hv-live.is-picking .hv-caps, .hv-live.is-picking .hv-timer { visibility: hidden; }
.hv-caps { border-radius: 16px; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.07); font-size: .86rem; }
.hv-caps summary { cursor: pointer; list-style: none; padding: 9px 14px; color: rgba(245,245,247,.6); font-size: .8rem; }
.hv-caps summary::-webkit-details-marker { display: none; }
.hv-caps summary::after { content: "▾"; float: left; opacity: .6; }
.hv-caps[open] summary::after { content: "▴"; }
.hv-caps-body { max-height: 22vh; overflow-y: auto; padding: 0 14px 10px; overscroll-behavior: contain; }
.hv-cap { margin: 0 0 6px; line-height: 1.8; color: rgba(245,245,247,.85); }
.hv-cap b { font-weight: 700; margin-inline-end: 6px; font-size: .76rem; color: #fcd34d; }
.hv-cap.is-user b { color: rgba(255,255,255,.55); }
.hv-type { display: flex; gap: 8px; }
.hv-type[hidden] { display: none; }
.hv-type input { flex: 1; min-width: 0; font: inherit; color: #fff; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 10px 12px; }
.hv-type button { font: inherit; font-weight: 700; color: #0f172a; background: #f59e0b; border: 0; border-radius: 14px; padding: 0 16px; cursor: pointer; }
.hv-bar { display: flex; align-items: flex-end; justify-content: space-around; gap: 6px; padding-top: 4px; }
.hv-btn { appearance: none; display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; color: rgba(245,245,247,.8); background: none; border: 0; cursor: pointer; padding: 0; }
.hv-btn svg { box-sizing: content-box; width: 24px; height: 24px; padding: 16px; border-radius: 50%; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.1); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: background .2s, transform .15s; }
.hv-btn small { font-size: .72rem; opacity: .75; }
.hv-btn:active svg { transform: scale(.94); }
.hv-btn .hv-slash { opacity: 0; }
.hv-btn[aria-pressed="true"] svg { background: #f5f5f7; color: #111; }
.hv-btn[aria-pressed="true"] .hv-slash { opacity: 1; }
.hv-end svg { width: 30px; height: 30px; padding: 19px; background: #ef4444; border-color: transparent; color: #fff; box-shadow: 0 12px 30px rgba(239,68,68,.45); }
.hv-end:hover svg { background: #dc2626; }
.hv-dbg { margin: 0; padding: 6px 10px; font: 11px/1.4 ui-monospace, monospace; color: rgba(245,245,247,.55); background: rgba(0,0,0,.28); border-radius: 10px; word-break: break-all; }
@keyframes hv-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes hv-ring { 0% { opacity: .65; transform: scale(1); } 100% { opacity: 0; transform: scale(1.55); } }
@keyframes hv-dot { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.6); } 70% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
@media (max-width: 480px) { .hv-live { padding: 0; } .hv-card { width: 100%; height: 100%; min-height: 100%; border-radius: 0; border: 0; padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .hv-live, .hv-wave, .hv-live-dot { animation: none !important; } .hv-face, .hv-bars i { transition: none; transform: none; } }

/* Call button in the existing Extruck chat footer */
.ex-agent-foot { position: relative; }
.ex-agent-call { appearance: none; flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; border: 2px solid #e2e8f0; background: #0f172a; color: #fbbf24; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ex-agent-call:hover { border-color: #f59e0b; }
.ex-agent-call:focus-visible { outline: 2px solid #f59e0b; outline-offset: 2px; }
.ex-agent-call svg { width: 20px; height: 20px; }

html.agent-lock, html.agent-lock body { overflow: hidden; }
