/* Alex, IV Consulting's AI assistant: chat bubble, rotating teaser and the incoming-call card (BA theme) */
.iva { /* own copies of the brand tokens, so the widget looks the same on every page (blogs and BA pages define these names differently) */
  --paper: #fffdf7; --ink: #0d1421; --muted: #5b6473; --yellow: #ffd93d; --mint: #00d9a3; --purple: #6c5ce7;
  --f-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif; --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  line-height: 1.45; letter-spacing: normal; text-align: left; }
.iva, .iva *, .iva *::before, .iva *::after { box-sizing: border-box; }
.iva { --iva-b: 20px; position: fixed; right: var(--iva-b); bottom: var(--iva-b); z-index: 90; display: grid; justify-items: end; gap: .7rem; font-family: var(--f-sans); color: var(--ink); pointer-events: none; }
.iva > * { pointer-events: auto; }
.iva [hidden] { display: none !important; }

/* launcher */
.iva-launch { order: 9; display: inline-flex; align-items: center; gap: .55rem; padding: .45rem 1.05rem .45rem .45rem; font: inherit; font-weight: 800; font-size: .95rem; color: var(--ink); background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 4px 4px 0 var(--ink); cursor: pointer; transition: transform .16s, box-shadow .16s; }
.iva-launch:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.iva-launch[aria-expanded="true"] { background: #fff; }
.iva-launch-av, .iva-av, .iva-teaser-av { position: relative; display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 50%; background: var(--ink); color: var(--yellow); font-weight: 800; font-size: 1rem; }
.iva-launch-av img, .iva-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.iva-teaser-av { object-fit: cover; padding: 0; }
.iva-launch-av i, .iva-av i { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border: 2px solid var(--yellow); border-radius: 50%; background: var(--mint); }
.iva-av i { border-color: #fff; }

/* teaser */
.iva-teaser { display: flex; align-items: flex-start; gap: .6rem; max-width: 300px; padding: .7rem .6rem .7rem .7rem; background: #fff; border: 2px solid var(--ink); border-radius: 18px 18px 4px 18px; box-shadow: 4px 4px 0 var(--ink); animation: iva-pop .35s cubic-bezier(.34, 1.56, .64, 1); }
.iva-teaser-av { width: 30px; height: 30px; font-size: .85rem; }
.iva-teaser-t { flex: 1; padding-top: .2rem; font-weight: 700; font-size: .92rem; line-height: 1.3; cursor: pointer; transition: opacity .25s, transform .25s; }
.iva-teaser-t.out { opacity: 0; transform: translateY(-4px); }
.iva-teaser-x { width: 22px; height: 22px; border: 0; background: none; font-size: 1.1rem; line-height: 1; cursor: pointer; color: var(--muted); }

/* chat panel */
.iva-panel { display: flex; flex-direction: column; width: min(380px, calc(100vw - 2 * var(--iva-b))); height: min(560px, calc(100vh - 120px)); background: var(--paper); border: 2px solid var(--ink); border-radius: 20px; box-shadow: 6px 6px 0 var(--ink); overflow: hidden; animation: iva-pop .3s cubic-bezier(.16, 1, .3, 1); }
.iva-head { display: flex; align-items: center; gap: .65rem; padding: .7rem .8rem; background: #fff; border-bottom: 2px solid var(--ink); }
.iva-av { width: 38px; height: 38px; font-size: 1.05rem; }
.iva-head p { flex: 1; display: grid; line-height: 1.2; }
.iva-head b { font-size: 1rem; }
.iva-head small { font-family: var(--f-mono); font-size: .62rem; color: var(--muted); }
.iva-callbtn, .iva-x { display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--ink); border-radius: 50%; background: #fff; cursor: pointer; font-size: 1.2rem; line-height: 1; color: var(--ink); }
.iva-callbtn { background: var(--mint); }
.iva-callbtn svg { width: 18px; height: 18px; }
.iva-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .55rem; padding: 1rem .9rem; }
.iva-m { max-width: 86%; padding: .6rem .8rem; border: 2px solid var(--ink); border-radius: 14px; font-size: .92rem; line-height: 1.4; overflow-wrap: anywhere; animation: iva-pop .25s ease-out; }
.iva-bot { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.iva-you { align-self: flex-end; background: var(--yellow); border-bottom-right-radius: 4px; font-weight: 600; }
.iva-m a { font-weight: 700; color: var(--purple); }
.iva-typing { display: inline-flex; gap: 4px; }
.iva-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); opacity: .3; animation: iva-dot 1s infinite; }
.iva-typing i:nth-child(2) { animation-delay: .15s; } .iva-typing i:nth-child(3) { animation-delay: .3s; }
.iva-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 .9rem .6rem; }
.iva-chips button { padding: .38rem .7rem; font: inherit; font-size: .8rem; font-weight: 700; background: #fff; border: 2px solid var(--ink); border-radius: 999px; cursor: pointer; text-align: left; }
.iva-chips button:hover { background: var(--yellow); }
.iva-form { display: flex; gap: .45rem; padding: .7rem .8rem; background: #fff; border-top: 2px solid var(--ink); }
.iva-form input { flex: 1; min-width: 0; padding: .6rem .75rem; font: inherit; font-size: .92rem; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); }
.iva-form input:focus { outline: 3px solid var(--yellow); outline-offset: 1px; }
.iva-form button { width: 42px; font-size: 1.1rem; font-weight: 800; background: var(--ink); color: #fff; border: 2px solid var(--ink); border-radius: 10px; cursor: pointer; }
.iva-foot { padding: .45rem .8rem .6rem; background: #fff; font-size: .72rem; color: var(--muted); }
.iva-foot a { color: var(--ink); font-weight: 700; }

/* ===== incoming call card ===== */
.ivc { --vol: 0; position: relative; display: grid; gap: .9rem; width: min(340px, calc(100vw - 2 * var(--iva-b))); padding: 1rem 1.1rem 1.1rem; color: #fff; background: radial-gradient(120% 70% at 50% 0%, #26324a 0%, var(--ink) 62%); border: 2px solid var(--ink); border-radius: 28px; box-shadow: 8px 8px 0 var(--yellow); overflow: hidden; animation: ivc-in .55s cubic-bezier(.34, 1.4, .64, 1); }
.ivc::before { content: ""; position: absolute; inset: -40% -20% auto; height: 70%; background: radial-gradient(closest-side, rgba(0, 217, 163, .22), transparent); pointer-events: none; animation: ivc-glow 3.2s ease-in-out infinite; }
.ivc[data-state="live"]::before { background: radial-gradient(closest-side, rgba(255, 217, 61, .2), transparent); }
.ivc-top { position: relative; display: flex; align-items: center; gap: .45rem; font-family: var(--f-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; }
.ivc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(0, 217, 163, .7); animation: ivc-blink 1.2s infinite; }
.ivc[data-state="live"] .ivc-dot { background: #ff5b6e; box-shadow: none; }
.ivc[data-state="ended"] .ivc-dot { animation: none; background: #8b93a3; }
.ivc-k { color: var(--mint); }
.ivc[data-state="live"] .ivc-k { color: #ff9aa6; }
.ivc-co { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; color: #c9ceda; letter-spacing: .06em; }
.ivc-co svg { width: 16px; height: 16px; color: #fff; }

.ivc-stage { position: relative; display: grid; justify-items: center; text-align: center; padding-top: .3rem; }
.ivc-orb { position: relative; display: grid; place-items: center; width: 132px; height: 132px; }
.ivc-av { position: relative; z-index: 2; display: block; width: 92px; height: 92px; border: 3px solid #fff; border-radius: 50%; object-fit: cover; background: #0d1421; box-shadow: 0 8px 30px rgba(255, 217, 61, .25); transform: scale(calc(1 + var(--vol) * .06)); transition: transform .08s linear; }
.ivc-wave { position: absolute; inset: 22px; border-radius: 50%; border: 2px solid var(--mint); opacity: 0; }
.ivc[data-state="ringing"] .ivc-wave { animation: ivc-sonar 2.1s cubic-bezier(.2, .6, .35, 1) infinite; }
.ivc[data-state="ringing"] .w2 { animation-delay: .7s; } .ivc[data-state="ringing"] .w3 { animation-delay: 1.4s; }
.ivc[data-state="ringing"] .ivc-av { animation: ivc-wiggle 2.1s ease-in-out infinite; }
.ivc[data-state="connecting"] .ivc-wave { opacity: .9; border-color: transparent; border-top-color: var(--yellow); border-right-color: rgba(255, 217, 61, .4); animation: ivc-spin 1s linear infinite; }
.ivc[data-state="connecting"] .w2 { inset: 12px; animation-duration: 1.6s; animation-direction: reverse; } .ivc[data-state="connecting"] .w3 { display: none; }
.ivc[data-state="live"] .ivc-wave { opacity: calc(.25 + var(--vol) * .75); border-color: var(--yellow); transform: scale(calc(1 + var(--vol) * .55)); transition: transform .09s linear, opacity .09s linear; }
.ivc[data-state="live"] .w2 { inset: 10px; transform: scale(calc(1 + var(--vol) * .35)); opacity: calc(.15 + var(--vol) * .5); }
.ivc[data-state="live"] .w3 { inset: 0; transform: scale(calc(1 + var(--vol) * .2)); opacity: calc(.08 + var(--vol) * .35); }
.ivc[data-state="live"].talking .ivc-av { box-shadow: 0 0 0 6px rgba(255, 217, 61, .25), 0 8px 30px rgba(255, 217, 61, .4); }
.ivc[data-state="ended"] .ivc-av { filter: grayscale(.7); box-shadow: none; }

.ivc-name { margin-top: .35rem; font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.ivc-sub { margin-top: .35rem; font-size: .84rem; color: #c9ceda; }
.ivc-eq { display: none; align-items: center; justify-content: center; gap: 4px; height: 26px; margin-top: .6rem; }
.ivc[data-state="live"] .ivc-eq { display: flex; }
.ivc-eq i { width: 4px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .35); transition: height .2s, background-color .2s; }
.ivc.talking .ivc-eq i { background: var(--yellow); animation: ivc-eq .9s ease-in-out infinite; }
.ivc.talking .ivc-eq i:nth-child(2) { animation-delay: .1s; } .ivc.talking .ivc-eq i:nth-child(3) { animation-delay: .25s; } .ivc.talking .ivc-eq i:nth-child(4) { animation-delay: .05s; }
.ivc.talking .ivc-eq i:nth-child(5) { animation-delay: .3s; } .ivc.talking .ivc-eq i:nth-child(6) { animation-delay: .15s; } .ivc.talking .ivc-eq i:nth-child(7) { animation-delay: .35s; }
.ivc-status { min-height: 1.2em; margin-top: .45rem; font-size: .84rem; font-weight: 700; color: var(--mint); }
.ivc[data-state="connecting"] .ivc-status, .ivc[data-state="ended"] .ivc-status { color: var(--yellow); }
.ivc.muted .ivc-status { color: #ff9aa6; }

.ivc-pitch { position: relative; margin: 0 auto; max-width: 30ch; text-align: center; font-size: .9rem; line-height: 1.4; color: #dfe3ea; }

.ivc-ring-acts, .ivc-live-acts { position: relative; display: flex; justify-content: space-around; align-items: flex-start; }
.ivc-live-acts { justify-content: center; align-items: center; gap: 2rem; }
.ivc-timer { font-family: var(--f-mono); font-size: 1.25rem; font-weight: 700; color: #fff; min-width: 4ch; text-align: center; }
.ivc-act { display: grid; justify-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; color: #c9ceda; }
.ivc-btn { display: grid; place-items: center; width: 58px; height: 58px; border: 2px solid transparent; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .12); cursor: pointer; transition: transform .16s, background-color .16s; }
.ivc-btn:hover { transform: translateY(-2px); }
.ivc-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.ivc-decline, .ivc-end { background: #ff5b6e; }
.ivc-decline svg, .ivc-end svg { transform: rotate(0deg); }
.ivc-accept { position: relative; background: #1fcf7b; color: var(--ink); }
.ivc[data-state="ringing"] .ivc-accept { animation: ivc-wiggle 1.4s ease-in-out infinite; }
.ivc[data-state="ringing"] .ivc-accept::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #1fcf7b; animation: ivc-sonar 1.4s ease-out infinite; }
.ivc-mute[aria-pressed="true"] { background: #fff; color: var(--ink); }

.ivc-done { position: relative; display: grid; gap: .5rem; justify-items: center; text-align: center; }
.ivc-done-t { font-weight: 800; font-size: 1.05rem; }
.ivc-done-s { font-size: .86rem; color: #c9ceda; max-width: 30ch; }
.ivc-done div { display: flex; gap: .5rem; margin-top: .3rem; }
.ivc-pill { padding: .55rem 1rem; font: inherit; font-weight: 800; font-size: .86rem; border: 2px solid var(--yellow); border-radius: 999px; background: var(--yellow); color: var(--ink); cursor: pointer; }
.ivc-pill.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.ivc-note { position: relative; text-align: center; font-family: var(--f-mono); font-size: .58rem; letter-spacing: .04em; color: #8b93a3; }

/* language picker */
.ivc-stay { display: none; position: relative; text-align: center; font-size: .8rem; color: #c9ceda; }

/* full-screen call: connecting, live and ended */
html.iva-lock, html.iva-lock body { overflow: hidden !important; }
.ivc.full { position: fixed; inset: 0; z-index: 200; width: auto; max-width: none; border: 0; border-radius: 0; box-shadow: none; padding: max(1.2rem, env(safe-area-inset-top)) 1.2rem max(1.4rem, env(safe-area-inset-bottom)); align-content: center; justify-items: center; gap: 1.6rem; background: radial-gradient(90% 60% at 50% 30%, #26324a 0%, #0d1421 70%); animation: ivc-full .45s cubic-bezier(.16, 1, .3, 1); }
.ivc.full::before { inset: -10% -10% auto; height: 80%; }
.ivc.full .ivc-top { position: absolute; top: max(1.2rem, env(safe-area-inset-top)); left: 1.4rem; right: 1.4rem; font-size: .72rem; }
.ivc.full .ivc-orb { width: min(300px, 62vw); height: min(300px, 62vw); }
.ivc.full .ivc-av { width: min(210px, 44vw); height: min(210px, 44vw); border-width: 4px; }
.ivc.full .ivc-wave { inset: calc(min(300px, 62vw) * .16); border-width: 3px; }
.ivc.full .ivc-name { margin-top: .8rem; font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem); }
.ivc.full .ivc-sub { font-size: 1rem; }
.ivc.full .ivc-eq { height: 36px; gap: 5px; } .ivc.full .ivc-eq i { width: 5px; }
.ivc.full .ivc-status { font-size: 1.05rem; margin-top: .6rem; }
.ivc.full .ivc-btn { width: 70px; height: 70px; } .ivc.full .ivc-btn svg { width: 28px; height: 28px; }
.ivc.full .ivc-act { font-size: .8rem; }
.ivc.full .ivc-live-acts { width: min(420px, 100%); }
.ivc.full .ivc-done { max-width: 420px; } .ivc.full .ivc-done-t { font-size: 1.4rem; } .ivc.full .ivc-done-s { font-size: 1rem; }
.ivc.full .ivc-stay { display: block; }
.ivc.full[data-state="ended"] .ivc-stay { display: none; }
.ivc.full .ivc-note { position: absolute; bottom: max(1rem, env(safe-area-inset-bottom)); left: 0; right: 0; }
@keyframes ivc-full { from { opacity: 0; transform: scale(.96); } }

@keyframes iva-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes iva-dot { 50% { opacity: 1; } }
@keyframes ivc-in { from { opacity: 0; transform: translateY(40px) scale(.92); } }
@keyframes ivc-glow { 50% { opacity: .55; transform: scale(1.08); } }
@keyframes ivc-blink { 0% { box-shadow: 0 0 0 0 rgba(0, 217, 163, .7); } 70% { box-shadow: 0 0 0 8px rgba(0, 217, 163, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 217, 163, 0); } }
@keyframes ivc-sonar { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.75); } }
@keyframes ivc-wiggle { 0%, 40%, 100% { transform: rotate(0); } 4%, 12%, 20%, 28% { transform: rotate(-9deg); } 8%, 16%, 24%, 32% { transform: rotate(9deg); } }
@keyframes ivc-spin { to { transform: rotate(360deg); } }
@keyframes ivc-eq { 0%, 100% { height: 5px; } 50% { height: 24px; } }

@media (max-width: 860px) { body.v2 .iva { bottom: 78px; } }
@media (max-width: 560px) { .iva { --iva-b: 12px; } .iva-launch-t { display: none; } .iva-launch { padding: .4rem; } }
@media (prefers-reduced-motion: reduce) { .iva *, .iva *::before, .iva *::after { animation: none !important; transition: none !important; } }
.ivc[data-state="ringing"] .ivc-status { display: none; }
html.iva-lock .iva { z-index: 2147483000; }

.ivc-accept-t { max-width: 9.5em; text-align: center; line-height: 1.2; color: #fff; }
