/* The AV Xpert AI Assistant window's stylesheet (packages/shell/assistant).
   Moved unchanged from the foot of CSS/dashboard-layout.css, and linked in
   the head of every page straight after it (includes/head-tag-contents.php),
   so every rule keeps its place in the cascade. */

/* =====================================================================
   The AV Xpert Assistant: the panel (packages/shell/assistant/v2/js/dash-assistant.js)

   Here rather than in a section stylesheet for the same reason as customer
   chat: it rides on every page. The same footprint as the two chat
   windows, so the three discs open into windows of one size in one place.
   Inside it is the shared AI terminal, unchanged; only its frame is made to
   fill the window.
   ===================================================================== */
.avx-corner-stack > .avx-ai-panel { order: 2; }
.avx-ai-panel {
  width: var(--avx-corner-w);
  max-width: calc(100vw - 24px);
  height: 560px;
  max-height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .26);
}
.avx-ai-panel[hidden] { display: none; }
.avx-ai-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 12px;
  background: #642a9a;
  color: #fff;
  flex: 0 0 auto;
}
.avx-ai-headtitle { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; }
.avx-ai-headbtn {
  flex: 0 0 auto;
  border: none;
  background: none;
  color: #fff;
  opacity: .82;
  cursor: pointer;
  padding: 3px 6px;
  font-size: 14px;
}
.avx-ai-headbtn:hover { opacity: 1; }
.avx-ai-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.avx-ai-body > div { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.avx-ai-panel .ai-ft-panel.avx-ai-term {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  border: none;
  border-radius: 0;
  background: #fff;
  padding: 10px 12px 8px;
}
.avx-ai-panel .ai-ft-chat { flex: 1 1 auto; max-height: none; min-height: 0; }
.avx-ai-panel .ai-ft-grip { display: none; }
/* Send, the arrow inside the reply box's corner, is every terminal's now
   (main.css .ai-ft-go-inside, Nick 12/10/2026) */
/* an answer's short lists keep their lines */
.avx-ai-panel .ai-ft-msg { white-space: pre-line; }
/* "Noted for a later version" is a card of its own (dashAssistant TurnsHtml
   marks it avx-ai-gap): a very pale orange, colour only, the bubble's own
   padding and radius (Nick, 11/10/2026) */
.avx-ai-panel .ai-ft-msg.ai.avx-ai-gap { background: #fff8f0; border-color: #fde7d3; }
.avx-ai-panel .ai-ft-link { color: #642a9a; font-weight: 600; text-decoration: underline; }
.avx-ai-panel .ai-ft-link:hover { color: #45b3e3; }
.avx-ai-ask-row { margin-top: 6px; }
/* The Shift+Enter hint a size smaller in the corner window */
.avx-ai-panel .avx-hint-pill { font-size: 10px; padding: 1px 7px; }
/* The house attachment box between the conversation and the question */
.avx-ai-panel { --avxc-accent: #642a9a; }
.avx-ai-panel .avx-ai-attachwrap { clear: both; }
.avx-ai-panel .avx-ai-attachwrap .mc-attach { margin: 0; }
.avx-ai-panel .avx-ai-attachwrap .mc-attach-strip.has-files { margin-bottom: 6px; }
@media only screen and (max-width: 560px) {
  .avx-corner-stack > .avx-ai-panel { width: 100%; max-width: none; }
}

/* The head's buttons (history, New Chat): real buttons, white on the purple, not bare glyphs */
.avx-ai-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.avx-ai-btn { box-sizing: border-box; height: var(--ctl-h-sm); }
/* icon only: the same height as New Chat, square */
.avx-ai-histbtn { width: var(--ctl-h-sm); padding: 0; justify-content: center; }
.avx-ai-btn:hover,
.avx-ai-btn.on { background: #fff; color: #642a9a; border-color: #fff; }
.avx-ai-btn[hidden] { display: none; }

/* The history: every conversation, pinned first, each with its menu */
.avx-ai-history { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px; }
.avx-ai-history[hidden], .avx-ai-body[hidden] { display: none; }
/* the history's search on its own row above the list */
.avx-ai-histfind { margin: 2px 2px 8px; display: flow-root; }
/* A search result: the sentence the term was found in, the term marked */
.avx-ai-rowexcerpt { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.4; color: #667085; overflow-wrap: anywhere; }
.avx-ai-hit { background: #f3e8ff; color: inherit; border-radius: 3px; padding: 0 1px; }
/* opened from a search: the term flashes, then fades back after 5s */
.avx-ai-flash { background: #fde68a; transition: background .8s ease; }
.avx-ai-flash.avx-ai-fade { background: transparent; }
/* The shared joined search takes its colours from --mu-accent, set on .mu-wrap,
   which the corner window sits outside: it gets the assistant's purple, and
   the legacy table float and the input's 260px cap give way to the full width
   (the float had left the row at no height, the list riding up over it) */
.avx-ai-panel { --mu-accent: #642a9a; --search-ring: #642a9a; }
.avx-ai-histfind .search-table { float: none; width: 100%; }
.avx-ai-panel .avx-ai-histfind .search-td { flex: 1 1 0 !important; min-width: 0 !important; width: auto !important; }
.avx-ai-panel .avx-ai-histfind .search-bar { width: 100% !important; max-width: none !important; box-sizing: border-box !important; }
.avx-ai-group {
  margin: 8px 6px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #98a2b3;
}
.avx-ai-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  border-radius: 9px;
}
.avx-ai-row:hover { background: #f6f1fb; }
.avx-ai-row.current { background: #efe6f8; }
.avx-ai-rowmain {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: none;
  text-align: left;
  padding: 7px 6px;
  cursor: pointer;
  color: #1f2733;
}
.avx-ai-rowtitle { display: block; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.avx-ai-rowtitle i { width: 16px; margin-right: 4px; color: #642a9a; font-size: 11px; }
.avx-ai-row.unread .avx-ai-rowtitle { font-weight: 700; }
.avx-ai-rowwhen { display: block; font-size: 11.5px; color: #98a2b3; margin-top: 1px; }
.avx-ai-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #642a9a; }
.avx-ai-rowdots {
  flex: 0 0 auto;
  border: none;
  background: none;
  color: #98a2b3;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.avx-ai-rowdots:hover { color: #642a9a; background: #fff; }
.avx-ai-rowmenu {
  position: absolute;
  right: 4px;
  top: 100%;
  z-index: 3;
  min-width: 170px;
  padding: 4px;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(31, 39, 51, .16);
}
.avx-ai-rowmenu[hidden] { display: none; }
.avx-ai-rowmenu button {
  display: block;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: #1f2733;
  cursor: pointer;
}
.avx-ai-rowmenu button:hover { background: #f6f1fb; color: #642a9a; }
.avx-ai-rowmenu button i { width: 16px; margin-right: 4px; color: #642a9a; }
.avx-ai-rename { flex: 1 1 auto; margin: 4px; }
.avx-ai-more { clear: both; display: flex; justify-content: center; padding: 10px 0 14px; }
.avx-ai-empty { margin: 26px 16px; text-align: center; font-size: 13px; color: #8a8a98; line-height: 1.5; }

/* The foot: the disclaimer on the left, the engine's version number in the
   bottom right corner, both sitting on the bottom line (no brass plaque here) */
.avx-ai-panel .ai-terminal-foot { justify-content: space-between; align-items: flex-end; gap: 28px; }
.avx-ai-panel .ai-monitor-note { text-align: left; }
/* Hide Forever, armed (window.avxArmed): red, asking */
.avx-ai-rowmenu .avx-ai-hide.armed { color: #c62828; font-weight: 600; }
