/* ==========================================================================
   Mentor assistant widget (T18, Nov 2026). Used by js/vis-chat.js on
   virtual-infra.com and virtualtrainingpro.com (same file on both sites).
   Bottom-right launcher; panel 380 x 560 on desktop, full screen on phones.
   The avatar's own styles come from the Mentor block inside vis-chat.js.
   ========================================================================== */
.vis-chat{position:fixed;right:20px;bottom:20px;z-index:100002;font-family:var(--body-font);font-size:15px}

.vis-chat-launcher{display:flex;align-items:center;gap:10px;height:58px;padding:0 20px 0 6px;border:0;border-radius:29px;
  background:var(--primary-color);color:#fff;font-weight:600;font-size:15px;line-height:1.2;cursor:pointer;
  box-shadow:0 12px 30px rgba(8,15,26,.35);transition:transform .2s ease,box-shadow .2s ease}
.vis-chat-launcher:hover{transform:translateY(-2px);box-shadow:0 16px 36px rgba(8,15,26,.4)}
.vis-chat-launcher:focus-visible{outline:3px solid #fff;outline-offset:3px}
/* Compact: the button is just Mentor's round badge. */
.vis-chat.is-compact .vis-chat-launcher,.vis-chat.is-open .vis-chat-launcher{width:62px;height:62px;padding:0;border-radius:50%;
  justify-content:center;background:transparent}
.vis-chat.is-compact .vis-chat-launcher .mtr,.vis-chat.is-open .vis-chat-launcher .mtr{width:62px;height:62px}
.vis-chat.is-compact .vis-chat-label,.vis-chat.is-open .vis-chat-label{display:none}

.vis-chat-panel{position:absolute;right:0;bottom:72px;width:380px;height:560px;max-height:calc(100vh - 110px);
  display:flex;flex-direction:column;background:#fff;border-radius:16px;overflow:hidden;
  box-shadow:0 24px 60px rgba(8,15,26,.35);animation:visChatIn .22s ease-out both}
.vis-chat-panel[hidden]{display:none}
@keyframes visChatIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

.vis-chat-head{display:flex;align-items:center;gap:12px;padding:12px 14px 12px 12px;background:var(--bg-dark-2);color:#fff}
.vis-chat-headface{flex:0 0 42px;height:42px}
.vis-chat-titles{flex:1 1 auto;min-width:0}
.vis-chat-titles strong{display:block;font-family:var(--heading-font);font-size:18px;line-height:1.2;color:#fff}
.vis-chat-titles span{display:block;font-size:12px;line-height:1.35;opacity:.75}
.vis-chat-actions{display:flex;align-items:center;gap:6px;flex:none}
.vis-chat-reset{border:1px solid rgba(255,255,255,.25);background:none;color:#fff;border-radius:14px;font-size:12px;line-height:1.3;
  padding:4px 10px;white-space:nowrap;cursor:pointer}
.vis-chat-reset:hover{border-color:var(--primary-color)}
.vis-chat-close{border:0;background:none;color:#fff;font-size:26px;line-height:1;width:32px;height:32px;border-radius:50%;cursor:pointer}
.vis-chat-close:hover{background:rgba(255,255,255,.12)}

.vis-chat-log{flex:1 1 auto;overflow-y:auto;padding:16px;background:#f6f7f9;display:flex;flex-direction:column;gap:10px}
.vis-chat-row{display:flex;align-items:flex-end;gap:8px;max-width:94%}
.vis-chat-row .vis-chat-msg{max-width:none;min-width:0}
.vis-chat-face-sm{flex:0 0 28px;height:28px}
.vis-chat-msg{max-width:88%;padding:10px 13px;border-radius:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;color:#1f2937}
.vis-chat-assistant{align-self:flex-start;background:#fff;border:1px solid rgba(8,15,26,.08);border-bottom-left-radius:4px}
.vis-chat-user{align-self:flex-end;background:var(--primary-color);color:#fff;border-bottom-right-radius:4px}
.vis-chat-msg a{color:var(--secondary-color);font-weight:600;text-decoration:underline}
.vis-chat-user a{color:#fff}
.vis-chat-error{border-color:#fecaca;background:#fff7f7}

.vis-chat-typing{display:flex;gap:5px;padding:14px;align-self:center}
.vis-chat-typing span{width:7px;height:7px;border-radius:50%;background:#94a3b8;animation:visChatDot 1s infinite ease-in-out}
.vis-chat-typing span:nth-child(2){animation-delay:.15s}
.vis-chat-typing span:nth-child(3){animation-delay:.3s}
@keyframes visChatDot{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}

.vis-chat-chips{display:flex;flex-wrap:wrap;gap:6px;padding:10px 16px 0;background:#f6f7f9}
.vis-chat-chips[hidden]{display:none}
.vis-chat-chip{border:1px solid rgba(var(--primary-color-rgb),.35);background:#fff;color:var(--secondary-color);
  border-radius:16px;padding:5px 11px;font-size:13px;line-height:1.3;cursor:pointer;text-align:left}
.vis-chat-chip:hover{background:rgba(var(--primary-color-rgb),.08)}

.vis-chat-form{display:flex;align-items:flex-end;gap:8px;padding:10px 12px;border-top:1px solid rgba(8,15,26,.08);background:#fff}
.vis-chat-input{flex:1 1 auto;resize:none;border:1px solid rgba(8,15,26,.15);border-radius:12px;padding:9px 12px;
  font:inherit;font-size:15px;line-height:1.4;max-height:120px;color:#111}
.vis-chat-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 3px rgba(var(--primary-color-rgb),.15)}
.vis-chat-send{flex:0 0 40px;height:40px;border:0;border-radius:50%;background:var(--primary-color);color:#fff;cursor:pointer;
  display:flex;align-items:center;justify-content:center}
.vis-chat-send:disabled{opacity:.5;cursor:default}
.vis-chat-note{padding:0 14px 10px;background:#fff;font-size:11.5px;line-height:1.5;color:#64748b}
.vis-chat-note a{color:inherit;text-decoration:underline}
.vis-chat-note .mtr-credit a{color:#334155}

@media (max-width:575.98px){
  .vis-chat{right:14px;bottom:14px}
  /* Phones always get the round badge: a wide label would cover the page. */
  .vis-chat .vis-chat-launcher{width:62px;height:62px;padding:0;border-radius:50%;justify-content:center;background:transparent}
  .vis-chat .vis-chat-launcher .mtr{width:62px;height:62px}
  .vis-chat .vis-chat-label{display:none}
  .vis-chat.is-open{inset:0;right:0;bottom:0}
  .vis-chat.is-open .vis-chat-launcher{display:none}
  .vis-chat-panel{position:fixed;inset:0;width:auto;height:auto;max-height:none;border-radius:0}
}
@media (prefers-reduced-motion:reduce){
  .vis-chat-panel,.vis-chat-typing span{animation:none}
}
