/* ===========================================================================
   Rozzo — the chat with Rozzo / the Assistant (js/assist.js): the right-side panel, the bar it shrinks to,
   the full-page chat on the Coach page, and the row of chats (up to two) with New chat and Clear. Used by index.html and console.html.
   =========================================================================== */
:root { --rzx-w: 400px; --rzx-ink: #1e2442; --rzx-ink2: #4a5070; --rzx-muted: #646a88; --rzx-line: #e8e6f2; --rzx-line2: #efeef6; --rzx-soft: #f4f3fa; --rzx-lav: #eceaf8; --rzx-lav-line: #c9c3ea; --rzx-lav-ink: #4f4596; --rzx-green: #49a52c; --rzx-lip: #37811f; }
/* the panel pushes the page to the left (on wide screens; on phones it covers the screen) */
@media (min-width: 900px) {
  html.rzx-docked body { padding-right: var(--rzx-w); }
  html.rzx-docked .toast, html.rzx-docked .ap-pill, html.rzx-docked .snack, html.rzx-docked .zoom-bar { margin-left: calc(var(--rzx-w) / -2); }
  /* full-width bars fixed to the screen stop at the panel (the résumé builder's Continue bar) */
  html.rzx-docked .coach-foot { right: var(--rzx-w); }
  /* pop-ups, loading screens and dialogs centre in the narrower page; the panel stays usable beside them */
  html.rzx-docked .scrim, html.rzx-docked .busy, html.rzx-docked .navscrim { right: var(--rzx-w); }
  html.rzx-docked .dialog { margin-left: calc(var(--rzx-w) / -2); max-width: calc(100vw - var(--rzx-w) - 32px); }
  html.rzx-docked .modal { max-width: calc(100vw - var(--rzx-w) - 40px); }
}
.rzx-dock { position: fixed; top: 0; right: 0; bottom: 0; width: var(--rzx-w); z-index: 120; display: flex; flex-direction: column; background: #fff; border-left: 2px solid var(--rzx-line); box-shadow: -14px 0 34px rgba(30,36,66,.07); font-family: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--rzx-ink); animation: rzxIn .22s cubic-bezier(.2,0,0,1) backwards; }
@keyframes rzxIn { from { transform: translateX(28px); opacity: 0; } }
@media (max-width: 899px) { .rzx-dock { left: 0; width: auto; border-left: 0; z-index: 420; } }
.rzx-head { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 8px 10px 14px; border-bottom: 2px solid var(--rzx-line2); }
.rzx-hav { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: #e2dff1; flex: 0 0 auto; }
.rzx-hn { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.rzx-hn b { font-weight: 900; font-size: 16.5px; }
.rzx-hn span { font-size: 12.5px; font-weight: 700; color: #2d6a16; display: inline-flex; align-items: center; gap: 6px; }
.rzx-hn span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rzx-green); }
.rzx-ib { width: 40px; height: 40px; flex: 0 0 auto; border: 0; border-radius: 50%; background: transparent; color: var(--rzx-ink2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rzx-ib:hover { background: var(--rzx-soft); color: var(--rzx-ink); }
.rzx-ib:focus-visible, .rzx-act:focus-visible, .rzx-send:focus-visible, .rzx-mini:focus-visible { outline: 3px solid #8a81c9; outline-offset: 2px; }
.rzx-thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 14px 10px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; scroll-behavior: smooth; }
.rzx-msg { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.rzx-msg.me { align-items: flex-end; }
.rzx-msg.me { justify-content: flex-end; }
.rzx-av { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: #e2dff1; }
.rzx-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 86%; }
.rzx-b { padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.5; font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }
.rzx-msg.ai .rzx-b { background: var(--rzx-soft); border-bottom-left-radius: 6px; }
.rzx-msg.me .rzx-b { background: var(--rzx-green); color: #fff; border-bottom-right-radius: 6px; max-width: 86%; }
.rzx-acts, .rzx-starters { display: flex; flex-wrap: wrap; gap: 6px; }
.rzx-starters { padding-left: 38px; }
.rzx-act { border: 2px solid var(--rzx-lav-line); background: #fff; color: var(--rzx-lav-ink); border-radius: 999px; padding: 6px 12px; font: 800 13px/1.25 "Nunito", ui-rounded, system-ui, sans-serif; cursor: pointer; text-align: left; }
.rzx-act:hover { background: var(--rzx-lav); }
.rzx-typing { display: inline-flex; align-items: center; gap: 5px; padding: 12px 15px; }
.rzx-typing em { font-style: normal; font-size: 13.5px; font-weight: 700; color: var(--rzx-muted); margin-left: 6px; }
.rzx-typing i { width: 7px; height: 7px; border-radius: 50%; background: #8a81c9; animation: rzxDot 1.2s infinite ease-in-out; }
.rzx-typing i:nth-child(2) { animation-delay: .15s; } .rzx-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes rzxDot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.rzx-comp { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 2px solid var(--rzx-line2); background: #fff; }
.rzx-comp textarea { flex: 1 1 auto; min-width: 0; resize: none; border: 2px solid var(--rzx-line); border-radius: 18px; padding: 10px 14px; font: 600 15px/1.4 "Nunito", ui-rounded, system-ui, sans-serif; color: var(--rzx-ink); background: #f8f7fd; max-height: 160px; }
.rzx-comp textarea:focus { outline: none; border-color: #8a81c9; background: #fff; }
.rzx-send { width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 50%; background: var(--rzx-green); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 3px 0 var(--rzx-lip); }
.rzx-send:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--rzx-lip); }
/* their chats (up to two): switch, start a new one, clear the one on screen */
.rzx-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 12px; border-bottom: 2px solid var(--rzx-line2); background: #fff; }
.rzx-bar[hidden] { display: none; }
.rzx-segs { flex: 1 1 auto; min-width: 0; display: flex; border: 2px solid var(--rzx-lav-line); border-radius: 999px; overflow: hidden; background: #fff; }
.rzx-seg { flex: 1 1 0; min-width: 0; height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border: 0; background: transparent; color: var(--rzx-ink2); font: 800 13.5px/1 "Nunito", ui-rounded, system-ui, sans-serif; cursor: pointer; }
.rzx-seg + .rzx-seg { border-left: 2px solid var(--rzx-lav-line); }
.rzx-seg span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rzx-seg svg { flex: 0 0 auto; }
.rzx-seg:hover { background: var(--rzx-soft); color: var(--rzx-ink); }
.rzx-seg.on { background: var(--rzx-lav); color: var(--rzx-lav-ink); }
.rzx-seg.add:not(.on) { color: var(--rzx-lav-ink); }
.rzx-wdot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #8a81c9; animation: rzxDot 1.2s infinite ease-in-out; }
.rzx-tb { flex: 0 0 auto; height: 40px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--rzx-ink2); font: 800 13.5px/1 "Nunito", ui-rounded, system-ui, sans-serif; cursor: pointer; }
.rzx-tb.lbl { padding: 0 12px 0 10px; }
.rzx-tb:hover { background: var(--rzx-soft); color: var(--rzx-ink); }
.rzx-seg:focus-visible, .rzx-tb:focus-visible, .rzx-btn:focus-visible { outline: 3px solid #8a81c9; outline-offset: -3px; }
/* the full page has room: chats keep their width, New chat and Clear sit on the right */
.rzx-full .rzx-bar { padding: 12px 14px 12px 18px; }
.rzx-full .rzx-segs { flex: 0 1 auto; }
.rzx-full .rzx-seg { flex: 0 1 auto; max-width: 260px; padding: 0 16px; }
.rzx-full .rzx-segs + .rzx-tb { margin-left: auto; }
/* narrow (the side panel, phones): chat names get the room — no icons in them, and Clear is just its icon on phones */
.rzx-bar { container: rzxbar / inline-size; }
@container rzxbar (max-width: 480px) { .rzx-seg { padding: 0 10px; } .rzx-seg:not(.add) svg { display: none; } .rzx-full .rzx-seg { padding: 0 10px; } }
@container rzxbar (max-width: 360px) { .rzx-tb.lbl span { display: none; } .rzx-tb.lbl { padding: 0 8px; } }
/* minimised: a bar at the bottom */
.rzx-mini { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 120; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 36px); padding: 6px 14px 6px 6px; border: 2px solid var(--rzx-line); border-radius: 999px; background: #fff; color: var(--rzx-ink); box-shadow: 0 12px 30px rgba(30,36,66,.16); font: 700 14px "Nunito", ui-rounded, system-ui, sans-serif; cursor: pointer; }
.rzx-mini img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: #e2dff1; flex: 0 0 auto; }
.rzx-mini span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rzx-mini b { font-weight: 900; }
.rzx-mini svg { flex: 0 0 auto; color: var(--rzx-muted); }
.rzx-dot { width: 9px; height: 9px; border-radius: 50%; background: #dd4b50; flex: 0 0 auto; }
@media (max-width: 899px) { .rzx-mini { right: 12px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); } }
/* the bar never sits on buttons: pages get room to scroll past it, and it rides above the résumé builder's Continue bar */
html.rzx-minibar body { padding-bottom: 76px; }
body.in-coach .rzx-mini { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 899px) { body.in-coach .rzx-mini { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); } }
/* "close the chat?" */
.rzx-ask { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(24,28,52,.32); }
.rzx-ask[hidden] { display: none; }
.rzx-ask-card { width: 100%; max-width: 340px; padding: 18px; border-radius: 20px; background: #fff; box-shadow: 0 24px 60px rgba(30,36,66,.25); }
.rzx-ask-card b { font-size: 17px; font-weight: 900; }
.rzx-ask-card p { margin: 6px 0 0; color: var(--rzx-ink2); font-size: 14px; line-height: 1.45; font-weight: 600; }
.rzx-ask-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.rzx-btn { flex: 0 0 auto; border: 0; border-radius: 999px; padding: 9px 16px; font: 800 14px "Nunito", ui-rounded, system-ui, sans-serif; background: #dd4b50; color: #fff; cursor: pointer; }
.rzx-btn:hover { background: #c83d42; }
.rzx-btn.ghost { background: var(--rzx-soft); color: var(--rzx-ink); }
.rzx-btn.ghost:hover { background: var(--rzx-lav); }
.rzx-btn.ok { background: var(--rzx-green); }
.rzx-btn.sm { padding: 7px 13px; font-size: 13px; }
/* "you can keep two chats": pick the one to clear */
.rzx-lims { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.rzx-lim { display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 12px; border: 2px solid var(--rzx-line); border-radius: 16px; }
.rzx-lim span { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--rzx-lav-ink); }
.rzx-lim svg { flex: 0 0 auto; }
.rzx-lim b { min-width: 0; font-size: 14px; font-weight: 800; color: var(--rzx-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the full-page chat */
.rzx-full { position: relative; display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden; background: #fff; border: 2px solid var(--rzx-line); border-radius: 26px; box-shadow: 0 3px 0 var(--rzx-line); }
.rzx-full .rzx-thread { padding: 22px 22px 12px; gap: 14px; }
.rzx-full .rzx-b { font-size: 15.5px; }
.rzx-full .rzx-av { width: 34px; height: 34px; }
.rzx-full .rzx-starters { padding-left: 42px; }
.rzx-comp.big { padding: 12px 14px 14px; }
.rzx-comp.big textarea { font-size: 16px; padding: 12px 16px; }
@media (prefers-reduced-motion: reduce) { .rzx-dock { animation: none; } .rzx-typing i, .rzx-wdot { animation: none; } .rzx-thread { scroll-behavior: auto; } }
