/* --------------------------------------------------------------------------
   Banners — outcomes and failures, not conversation

   Aligned with the messages' text, not their padded boxes. "Connected to…"
   (banner-ok) is a quiet line in the middle of the column — a fact about the
   conversation, not a message in it.
   -------------------------------------------------------------------------- */

.banner {
  width: min(calc(var(--column) - 48px), calc(100% - 48px));
  margin: 0 auto 20px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
}

.banner-ok {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 0;
  border-color: transparent;
  background: none;
  text-align: center;
  font-size: 12.5px;
}

.banner-ok::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pos);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pos) 18%, transparent);
}

.banner-bad { border-color: var(--danger-border); background: var(--danger-soft); color: var(--neg); }

/* Inside an answer — a turn that failed — the banner is the answer's text,
   aligned with it, not with the column. */
.msg-body .banner { width: auto; margin: 0; }

/* --------------------------------------------------------------------------
   Composer

   Two rows: the words, then the hint beside the microphone and Send.
   -------------------------------------------------------------------------- */

.composer {
  flex-shrink: 0;
  padding: 6px 24px 18px;
  background: linear-gradient(to top, var(--page-bg) 70%, transparent);
}

.composer-box {
  position: relative;
  width: min(calc(var(--column) - 48px), 100%);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--surface);
  /* A text field's outline is the only thing that shows where it is: 3:1. */
  border: 1px solid var(--border-input);
  border-radius: var(--r-xl);
  padding: 9px 9px 9px 18px;
  box-shadow: var(--shadow-lg);
  transition: border-color .15s, box-shadow .15s;
}

/* The textarea draws no outline of its own, so the box carries the focus ring:
   the same 2px ring as every other control, not a 10%-alpha glow. Laid over
   the border, so it reads as the box's own edge turning blue. */
.composer-box:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.composer-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  resize: none;
  background: none;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-strong);
  padding: 7px 0;
  max-height: 180px;
}

.composer-input::placeholder { color: var(--text-faint); }
/* Read-only, not disabled, during a turn: disabling the box the operator is
   typing in throws their focus to the top of the page for the whole wait. */
.composer-input[readonly]     { color: var(--text-faint); }

/* Under the box: what to keep in mind on the left, the model on the right. */
.composer-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  width: min(calc(var(--column) - 48px), 100%);
  margin: 8px auto 0;
  padding: 0 6px;
}

.composer-hint {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-faint);
}

.composer-model {
  flex: none;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-muted);
  white-space: nowrap;
}

.btn-send {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  /* ZERO PADDING. This element also carries `.btn`, which sets 9px 18px for
     text buttons — on a fixed 36px square that left a 17px gap on one side and
     1px on the other, pushing the icon hard right and almost out of the box.
     An earlier "fix" nudged the glyph a pixel, which treated an off-centre
     layout as an optical illusion and left the real cause in place. */
  padding: 0;
  /* Flat accent, matching Confirm and every other primary control: one big
     call to action per page, and on a card that is Confirm. */
  background: var(--accent-fill);
  color: var(--text-on-accent);
  transition: background .15s, transform .12s;
}

.btn-send:hover:not([aria-disabled="true"]) { background: var(--accent-fill-hover); }
.btn-send[aria-disabled="true"]             { background: var(--border-strong); cursor: default; }
/* Stop, while an answer is worked out: the theme's ink, so it reads as a
   different button from Send at a glance — not by colour alone, the icon
   changes too. */
.btn-send.is-stop                           { background: var(--text-strong); color: var(--page-bg); }
.btn-send.is-stop:hover:not([aria-disabled="true"]) { background: var(--text); }
.btn-send.is-stop[aria-disabled="true"]     { background: var(--text-muted); }
.btn-send:active:not([aria-disabled="true"]) { transform: scale(.92); }

/* The paper plane's ink sits slightly low-left inside its own viewBox, so a
   mathematically centred glyph still reads a touch off. One pixel, applied on
   top of a box that is now genuinely centred — not instead of centring it. */
.btn-send svg {
  transform: translate(1px, -1px);
}
