/* ============================================================
   CONTAINED CHAT — shared Browse Mode primitive (Task #424).
   A bordered on-ramp surface (NOT the real chat shell). Sits
   inside /home and /ai-ops as a way to hand a visitor's first
   prompt across to Ask mode. Chip click or composer submit calls
   BE.containedChat's onSubmit which, by default, writes the text to
   sessionStorage.be_pending_seed_prompt and navigates `/` (chat.js
   then dispatches it as the visitor's first user turn).
   ============================================================ */

.contained-chat {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 28px 24px;
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: var(--r-md, 4px);
}

.contained-chat__status {
  display: flex;
  align-items: center;
  gap: 10px;
}
.contained-chat__pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--be-yellow);
  animation: element-entry-pulse 2.4s var(--ease-out, ease) infinite;
}
.contained-chat__status-label {
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--text-faint);
}

.contained-chat__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.contained-chat__chip {
  font-family: var(--sans);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-body);
  color: var(--text);
  background: transparent;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color .18s var(--ease-out, ease),
              background .18s var(--ease-out, ease),
              color .18s var(--ease-out, ease);
}
.contained-chat__chip:hover,
.contained-chat__chip:focus-visible {
  border-color: var(--be-yellow);
  color: var(--be-yellow);
  outline: none;
}

.contained-chat__composer {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--ink-line);
  padding-top: 16px;
}
.contained-chat__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--sans);
  font-size: var(--fs-body);
  color: var(--text);
  padding: 8px 0;
}
.contained-chat__input::placeholder {
  font-style: italic;
  color: var(--text-faint);
}
.contained-chat__send {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--be-yellow);
  color: var(--ink);
  border: none;
  font-family: var(--mono);
  font-size: var(--fs-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter .18s var(--ease-out, ease), transform .18s var(--ease-out, ease);
}
.contained-chat__send:hover,
.contained-chat__send:focus-visible {
  filter: brightness(1.08);
  transform: translateX(2px);
  outline: none;
}

@media (max-width: 640px) {
  .contained-chat { padding: 20px 18px 18px; gap: 18px; }
  .contained-chat__input { font-size: var(--fs-body); }
}

@media (prefers-reduced-motion: reduce) {
  .contained-chat__pulse,
  .contained-chat__send { animation: none; transition: none; }
}
