/* G2, the composer (rows 172, 123, 98, 102, 105). Colours are the existing tokens only, so the dark
   theme follows them. Linked from index.html after style.css. */

/* Row 172: the box and its two suggestion buttons. The wrap takes the textarea's place in the row. */
.field-wrap { position: relative; flex: 1; display: flex; min-width: 0; }
.field-wrap textarea { flex: 1; min-width: 0; }
.field-wrap.has-suggest textarea { padding-right: 96px; }
.field-wrap.has-suggest textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-arrows { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 16px; }
#suggest-next, #suggest-use {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  position: relative;
}
/* The hit area is 44 by 44 around the 28 circle; the 16 gap keeps the two apart. */
#suggest-next::after, #suggest-use::after { content: ''; position: absolute; inset: -8px; }
#suggest-next[hidden], #suggest-use[hidden] { display: none; }
#suggest-next:focus-visible, #suggest-use:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Row 123: the picture waiting to send, small, beside its name. */
.attach-bar .attach-thumb { flex: none; width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--surface); }
.attach-bar .attach-thumb[hidden] { display: none; }

/* Row 98: the full screen viewer's Save and Share, and the zoomed picture. */
.lightbox .lightbox-tools { display: flex; gap: 8px; }
.lightbox .lightbox-tools a, .lightbox .lightbox-tools button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 22px; display: inline-flex; align-items: center; background: var(--bar); color: var(--text); font: inherit; text-decoration: none; cursor: pointer; }
.lightbox img.zoomed { cursor: grab; touch-action: none; }

/* Row 102: a held mic grows and turns red while the finger is down; the hint fades as it slides. */
#mic.held { background: var(--danger); transform: scale(1.25); touch-action: none; }
#mic { touch-action: none; }
.hold-hint { color: var(--muted); font-size: 15px; }

/* Row 105: the voice bar as a slider, dragged and stepped by the arrow keys. */
.voice-bar[role='slider'] { touch-action: none; cursor: pointer; }
.voice-bar[role='slider']:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { #mic.held { transform: none; } }
