/* AZ, the az.ai guide (azai-v17): voice orb, greeting, panel, tour highlight. Self-contained, prefixed .azi-, cheap to paint. */
.azi-orb { --s: 56px; position: relative; display: inline-block; width: var(--s); height: var(--s); border-radius: 50%; flex: none; }
.azi-orb i { position: absolute; inset: 0; border-radius: 50%; }
.azi-orb .r1 { background: conic-gradient(from 200deg, #23d8ff, #7a5cff, #c13cff, #ffb547, #23d8ff); -webkit-mask: radial-gradient(circle, transparent 58%, #000 61%, #000 74%, transparent 77%); mask: radial-gradient(circle, transparent 58%, #000 61%, #000 74%, transparent 77%); filter: drop-shadow(0 0 calc(var(--s) * .16) rgba(140, 100, 255, .75)); }
.azi-orb .r2 { inset: 22%; border: 1px solid rgba(220, 210, 255, .45); }
.azi-orb .core { inset: 36%; background: radial-gradient(circle, #fff 0, #e6dcff 35%, rgba(138, 92, 255, .2) 75%, transparent 100%); }
[data-state] .azi-orb .r1 { animation: azi-breathe 4.2s ease-in-out infinite; }
[data-state="listening"] .azi-orb .r2 { animation: azi-ripple 1.1s ease-out infinite; }
[data-state="thinking"] .azi-orb .r1 { animation: azi-spin 1.4s linear infinite; }
[data-state="speaking"] .azi-orb .core { animation: azi-pulse .32s ease-in-out infinite alternate; }
@keyframes azi-breathe { 50% { transform: scale(1.05); } }
@keyframes azi-ripple { from { transform: scale(1); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
@keyframes azi-spin { to { transform: rotate(360deg); } }
@keyframes azi-pulse { to { transform: scale(1.28); } }
@media (prefers-reduced-motion: reduce) { .azi-orb i { animation: none !important; } }

.azi-dock { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: flex-end; gap: 10px; pointer-events: none; }
.azi-dock > * { pointer-events: auto; }
.azi-fab { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border: 0; border-radius: 50%; background: radial-gradient(circle, rgba(18, 16, 40, .9) 55%, transparent 72%); cursor: pointer; padding: 0; }
.azi-fab .azi-tag { position: absolute; right: 70px; bottom: 18px; white-space: nowrap; font: 600 12.5px/1 Inter, system-ui, sans-serif; color: #f3f0ff; background: rgba(16, 20, 40, .92); border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; padding: 7px 11px; opacity: 0; transform: translateX(6px); transition: .25s; pointer-events: none; }
.azi-dock.greeting .azi-tag { opacity: 1; transform: none; }
.azi-greet { display: none; max-width: 270px; background: rgba(14, 18, 36, .94); color: #eef1ff; border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px 16px 4px 16px; padding: 12px 13px; font: 14px/1.45 Inter, system-ui, sans-serif; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
.azi-greet b { display: block; margin-bottom: 3px; }
.azi-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.azi-acts button { min-height: 36px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .07); color: inherit; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.azi-acts .x { min-width: 36px; padding: 0; }
@media (min-width: 761px) { .azi-dock.greeting .azi-greet { display: block; } .azi-dock.greeting .azi-tag { display: none; } }
body.azi-open .azi-dock { display: none; }

.azi-panel { position: fixed; z-index: 61; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); width: min(400px, calc(100vw - 28px)); height: min(620px, calc(100vh - 28px)); display: flex; flex-direction: column; background: rgba(10, 14, 30, .97); color: #eef1ff; border: 1px solid rgba(140, 110, 255, .45); border-radius: 20px; box-shadow: 0 0 0 1px rgba(35, 216, 255, .15), 0 30px 80px rgba(0, 0, 0, .6); font: 15px/1.5 Inter, system-ui, sans-serif; overflow: hidden; }
.azi-panel[hidden] { display: none; }
.azi-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.azi-ht { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.azi-ht small { color: #a9b3cf; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.azi-ib { min-width: 40px; min-height: 36px; border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: inherit; border-radius: 10px; font: inherit; font-size: 13px; cursor: pointer; padding: 0 9px; }
.azi-log { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.azi-m p { margin: 0; white-space: pre-wrap; }
.azi-m.azi p { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: 4px 14px 14px 14px; padding: 9px 11px; }
.azi-m.you { align-self: flex-end; max-width: 85%; }
.azi-m.you p { background: linear-gradient(135deg, rgba(35, 216, 255, .22), rgba(122, 92, 255, .25)); border-radius: 14px 4px 14px 14px; padding: 8px 11px; }
.azi-x { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; font-size: 13px; color: #a9b3cf; }
.azi-card { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(97, 242, 221, .45); color: #bff9ef; background: rgba(97, 242, 221, .07); text-decoration: none; font: inherit; font-size: 13px; cursor: pointer; }
.azi-card.do { background: linear-gradient(135deg, #61f2dd, #23d8ff); color: #04121f; border: 0; font-weight: 600; }
.azi-sugg { display: flex; gap: 6px; overflow-x: auto; padding: 0 14px 8px; scrollbar-width: none; }
.azi-sugg button { flex: none; min-height: 34px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .04); color: #dfe6ff; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer; }
.azi-form { display: flex; gap: 6px; padding: 10px 12px 6px; border-top: 1px solid rgba(255, 255, 255, .08); }
.azi-form input { flex: 1; min-width: 0; min-height: 44px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); color: inherit; padding: 0 12px; font: inherit; font-size: 16px; outline: none; }
.azi-form input:focus { border-color: rgba(35, 216, 255, .7); }
.azi-mic, .azi-send { min-width: 44px; min-height: 44px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); color: inherit; font: inherit; cursor: pointer; }
.azi-mic.on { border-color: #ff8ad8; }
.azi-send { background: linear-gradient(135deg, #61f2dd, #23d8ff); color: #04121f; border: 0; font-weight: 700; padding: 0 14px; }
.azi-foot { margin: 0; padding: 0 14px 10px; color: #8d97b5; font-size: 11.5px; }
.azi-hl { position: relative; z-index: 5; outline: 2px solid #61f2dd !important; outline-offset: 6px; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(3, 6, 16, .45), 0 0 30px rgba(97, 242, 221, .5) !important; transition: box-shadow .2s; }
.azi-ask { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 11px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .04); color: #dfe6ff; font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: none; }
.azi-ask::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: conic-gradient(#23d8ff, #7a5cff, #ffb547, #23d8ff); -webkit-mask: radial-gradient(circle, transparent 40%, #000 45%); mask: radial-gradient(circle, transparent 40%, #000 45%); }
@media (max-width: 760px) { .azi-panel { right: 8px; left: 8px; width: auto; bottom: 8px; height: min(76vh, 620px); } }
@media (min-width: 761px) { .azi-dock.greeting.tagonly .azi-greet { display: none; } .azi-dock.greeting.tagonly .azi-tag { display: block; } }

/* azai-v17b: the orb never covers the page on load; smaller on phones; room at the bottom so it never hides the last line */
.azi-dock { transition: opacity .2s, transform .2s, visibility .2s; }
.azi-dock.azi-away { opacity: 0; visibility: hidden; transform: translateY(14px); pointer-events: none; }
body { padding-bottom: 72px; }
@media (max-width: 700px) { .azi-fab .azi-orb { --s: 46px !important; } .azi-fab .azi-tag { display: none; } }

/* azai-v17c: area line in the panel; "Ask AZ" in the top bar */
.azi-ctx { margin: 0; padding: 6px 14px; font-size: 13px; color: #9fe9ff; border-bottom: 1px solid rgba(70, 100, 170, .35); }
.azi-top { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px 0 6px; border-radius: 20px; border: 1px solid rgba(35, 216, 255, .55); background: rgba(35, 216, 255, .08); color: #e8f7ff; font: inherit; font-weight: 600; cursor: pointer; }
.azi-top .azi-orb { flex: none; }
.azi-top > span:not(.azi-orb) { white-space: nowrap; }   /* qa1015 T-1064: "Ask AZ" never wraps */
@media (max-width: 560px) { .azi-top span { display: none; } .azi-top { padding: 0 6px; min-width: 44px; justify-content: center; } }

/* azai-v17f: the top-bar Ask AZ button stays readable on phones (orb + "AZ"), 44 px target */
@media (max-width: 560px) {
  .azi-top { min-width: 44px; min-height: 44px; padding: 0 10px 0 6px; gap: 4px; }
  .azi-top > span:not(.azi-orb) { display: inline !important; font-size: 13px; }   /* the orb is a span too: never hide it */
  .azi-top .azi-orb { --s: 26px !important; display: inline-block !important; }   /* 17c's '.azi-top span { display: none }' caught the orb */
}
/* signed in, the top bar also holds credits and the avatar: on narrow phones the button is the orb alone (30 px, still a 44 px target) */
@media (max-width: 420px) { body:not(.guest) .azi-top > span:not(.azi-orb) { display: none !important; } body:not(.guest) .azi-top { padding: 0 7px; } body:not(.guest) .azi-top .azi-orb { --s: 30px !important; display: inline-block !important; } }

/* ================= azai-v17e: the chat kit inside the AZ panel (az.ai theme; the green listening wheel stays) ================= */
.azi-ck { padding: 0 12px 6px; }
.azi-panel { z-index: 2147483100; }   /* above the network strip's arrows (z 2147483001) while AZ is open */
.azi-ck .ck { --ck-bg: rgba(9,16,34,.9); --ck-solid: #091022; --ck-line: rgba(35,216,255,.22); --ck-text: #e8f0ff; --ck-muted: #a9b8d6;
  --ck-field: #0e1a33; --ck-field-text: #e8f0ff; --ck-live-bg: #0f2a22; --ck-live-text: #bff7de;
  --ck-accent: #45e2f0; --ck-accent2: #23d8ff; --ck-accent-text: #03121c; --ck-focus: #7cc4ff; --ck-r: 16px; padding: 8px; }
.azi-ck .ck-log, .azi-ck .ck-chips { display: none !important; }   /* the conversation, cards and chips stay in AZ's own panel */
