/* Assistant — site integration (#9626).
   Built to design v3. Every colour below is one of the site's own :root tokens; no
   new palette is introduced and no dark block exists, because bizsolutions.dev has
   no prefers-color-scheme rule and a dark widget would sit inside a light page. */

.assistant {
  font-family: var(--font-body);
  border: 1px solid var(--gray-200);
  border-radius: 5px;
  background: var(--paper);
  overflow: hidden;
}

.assistant--inline { margin: 2.5rem 0 0; }

/* ---- head ---- */
.assistant__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--paper);
}
.assistant__title { font-size: .875rem; font-weight: 600; color: var(--ink); margin: 0; }
.assistant__sub {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em;
  color: var(--gray-500); margin: 2px 0 0; text-transform: uppercase;
}
.assistant__close {
  font-family: var(--font-mono); font-size: 13px; color: var(--gray-500);
  background: none; border: 0; cursor: pointer; padding: 4px 6px; line-height: 1;
}
.assistant__close:hover { color: var(--ink); }

/* ---- opening state ---- */
.assistant__empty { padding: 26px 18px; background: var(--paper); }
.assistant__empty p { margin: 0; font-size: .9063rem; line-height: 1.55; color: var(--ink); max-width: 44ch; }
.assistant__empty .assistant__hint { margin-top: 14px; font-size: .8125rem; color: var(--gray-500); }

/* ---- transcript ---- */
.assistant__log {
  padding: 18px 16px; display: flex; flex-direction: column; gap: 14px;
  background: var(--paper); max-height: 26rem; overflow-y: auto;
}
.assistant__log:empty { display: none; }

.assistant__msg { max-width: 88%; font-size: .9063rem; line-height: 1.55; margin: 0; }
.assistant__msg--visitor {
  align-self: flex-end; background: var(--indigo-800); color: var(--paper);
  padding: 10px 13px; border-radius: 4px 4px 1px 4px;
}
.assistant__msg--reply { align-self: flex-start; color: var(--ink); }
/* A refusal is marked, not disguised. Spec section 4: it fails toward silence and says so. */
.assistant__msg--bounded { border-left: 2px solid var(--amber-500); padding-left: 13px; }

.assistant__srcs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.assistant__src {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em;
  color: var(--indigo-700); border: 1px solid var(--indigo-200); background: var(--indigo-50);
  padding: 3px 7px; border-radius: 2px; text-decoration: none;
}
.assistant__src:hover { border-color: var(--indigo-700); }

/* The site has no visually-hidden utility, so the component carries its own rather
   than adding a global class other pages would inherit unasked. */
.assistant__label-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- composer ---- */
.assistant__composer {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-top: 1px solid var(--gray-200); background: var(--gray-50);
}
.assistant__input {
  flex: 1; min-width: 0; font-family: var(--font-body); font-size: .8438rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--gray-200); border-radius: 3px; padding: 9px 11px;
}
.assistant__input::placeholder { color: var(--gray-500); }
.assistant__input:focus { outline: 2px solid var(--indigo-700); outline-offset: 1px; }
.assistant__send {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gray-500); background: none; border: 0; cursor: pointer; padding: 6px 2px;
}
.assistant__send:hover:not(:disabled) { color: var(--indigo-800); }
.assistant__send:disabled { cursor: default; opacity: .5; }

/* ---- persistent launcher ---- */
/* Quiet by construction: no animation, no auto-open, no attention-seeking. */
.assistant-launcher {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  display: flex; align-items: center; gap: 9px;
  background: var(--indigo-800); color: var(--paper);
  border: 0; border-radius: 3px; padding: 11px 15px;
  font-family: var(--font-body); font-size: .8125rem; font-weight: 500; cursor: pointer;
  box-shadow: 0 1px 2px rgba(13,23,53,.06), 0 8px 24px -12px rgba(13,23,53,.18);
}
.assistant-launcher__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber-500); flex: none; }
.assistant-launcher[hidden] { display: none; }

/* Docked panel the launcher opens. */
.assistant--docked {
  position: fixed; right: 18px; bottom: 18px; z-index: 41;
  width: 22rem; max-width: calc(100vw - 36px);
  box-shadow: 0 1px 2px rgba(13,23,53,.06), 0 18px 44px -16px rgba(13,23,53,.3);
}

@media (max-width: 480px) {
  .assistant--docked { right: 12px; left: 12px; bottom: 12px; width: auto; max-width: none; }
  .assistant-launcher { right: 12px; bottom: 12px; }
  .assistant__msg { max-width: 94%; }
}

@media (prefers-reduced-motion: reduce) {
  .assistant, .assistant-launcher { transition: none; }
}
