/* Reusable components (§40.2). In-house, no frameworks. */

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-12);
  font-weight: 600;
  font-size: var(--text-sm);
  border: 1px solid transparent;
  transition: background var(--motion-fast) var(--ease-out),
    border-color var(--motion-fast) var(--ease-out),
    color var(--motion-fast) var(--ease-out),
    transform var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-fast) var(--ease-out);
  position: relative;
  /* Touch targets meet the 44x44 minimum (Apple HIG / WCAG 2.5.5) even for
     compact text buttons such as .btn-sm. */
  min-height: 44px;
  min-width: 44px;
}

.btn:hover:not([disabled]) {
  transform: translateY(-1px);
}

.btn:active:not([disabled]) {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: var(--shadow-1);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-2);
}
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-1);
}
.btn-secondary:hover {
  background: var(--surface-sunken);
  box-shadow: var(--shadow-2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--surface-sunken);
  color: var(--text);
  transform: none;
}

.btn-danger {
  background: var(--error);
  color: var(--danger-fg);
  box-shadow: var(--shadow-1);
}
.btn-danger:hover {
  filter: brightness(1.05);
  box-shadow: var(--shadow-2);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-sm {
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--text-xs);
}

.icon-btn {
  width: 44px;
  height: 44px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  color: var(--text-secondary);
  transition: background var(--motion-fast) var(--ease-out),
    color var(--motion-fast) var(--ease-out),
    transform var(--motion-fast) var(--ease-out);
}
.icon-btn:hover {
  background: var(--surface-sunken);
  color: var(--text);
}
.icon-btn:active {
  transform: scale(0.95);
}

/* --- Inputs --------------------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--sp-5);
}
.field-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: var(--sp-1);
}
.input,
.textarea,
.select {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-12);
  color: var(--text);
  transition: border-color var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-fast) var(--ease-out);
}
.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
  outline: none;
}
.textarea {
  resize: vertical;
  min-height: 88px;
}
.hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}
.hint-error {
  color: var(--error);
}
.hint-ok {
  color: var(--success);
}

/* --- Cards & surfaces ------------------------------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-16);
  padding: var(--sp-6);
  box-shadow: var(--shadow-1);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  letter-spacing: 0.02em;
}
.badge-success { background: rgba(30, 142, 90, 0.14); color: var(--success); }
.badge-warn { background: rgba(183, 121, 31, 0.16); color: var(--warning); }
.badge-error { background: rgba(198, 63, 74, 0.14); color: var(--error); }
.badge-neutral { background: var(--surface-sunken); color: var(--text-secondary); }

/* --- Security indicator (§39.3) ---------------------------------------------- */
.sec {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: var(--text-xs);
}
.sec svg { width: 15px; height: 15px; }
.sec-encrypted { color: var(--encryption); }
.sec-verified { color: var(--secondary); }
.sec-warning { color: var(--warning); }

/* --- Bubbles ---------------------------------------------------------------- */
.messages { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-5); }
.msg { display: flex; flex-direction: column; max-width: min(520px, 78%); }
/* Entrance motion is opt-in (added only to genuinely new messages) so a full
 * re-render does not replay the animation on the whole conversation. */
.msg.enter { animation: rise var(--motion-med) var(--ease-out); }
.msg.own { align-self: flex-end; align-items: flex-end; }
.msg.other { align-self: flex-start; align-items: flex-start; }
/* Group attribution: the author's name (and avatar) above an incoming bubble.
 * A direct chat carries the peer in the header, so this is group-only. */
.msg-sender {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin: 0 0 4px var(--sp-1);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
}
.msg-sender .avatar.sm { width: 22px; height: 22px; font-size: var(--text-xs); }
.msg-sender-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble {
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-20);
  line-height: 1.6;
  /* `anywhere` (not `break-word`) so a long unbroken run — a URL, a hash, a
   * pasted token — also lowers the bubble's min-content size. `break-word`
   * leaves min-content untouched, so the shrink-to-fit bubble overflows its
   * 520px cap and the whole message pane gains a horizontal scrollbar. */
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  box-shadow: var(--shadow-1);
  max-width: 100%;
}
.own .bubble {
  background: var(--bubble-own);
  color: var(--text);
  border: 1px solid var(--bubble-own);
  border-bottom-right-radius: var(--r-8);
}
.other .bubble {
  background: var(--bubble-other);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: var(--r-8);
}
.msg-meta {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 0 var(--sp-1);
}
.tick { font-size: var(--text-xs); color: var(--text-tertiary); }
.tick.sent { color: var(--text-tertiary); }
.tick.delivered { color: var(--secondary); }
.tick.read { color: var(--secondary); font-weight: 700; }
.msg-actions {
  opacity: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  transition: opacity 0.12s ease;
}
/* The message menu stays visually small next to the bubble, but its tappable
   area is expanded to the 44x44 minimum so it is reachable on touch. */
.msg-actions::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}
.msg:hover .msg-actions,
.msg:focus-within .msg-actions { opacity: 1; }
@media (hover: none) {
  .msg-actions { opacity: 1; }
}
.decrypt-error {
  background: var(--surface-sunken);
  color: var(--error);
  font-size: var(--text-sm);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-12);
}
.disappearing-chip { font-size: var(--text-xs); color: var(--text-tertiary); }

/* --- Composer ---------------------------------------------------------------- */
.composer {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-4);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.composer textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-24);
  padding: var(--sp-2) var(--sp-4);
  min-height: 44px;
  max-height: 160px;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-fast) var(--ease-out);
}
.composer textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
  outline: none;
}

/* --- Blocked / removed-contact bar (replaces the composer) ------------------ */
.blocked-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-sunken);
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.blocked-bar-text { flex: 1; min-width: 0; }
.blocked-bar .btn { flex: none; }

/* --- Voice notes ------------------------------------------------------------ */
.btn-mic { transition: color var(--motion-fast) var(--ease-out), background var(--motion-fast) var(--ease-out); }
.btn-mic.recording { color: var(--error); background: var(--error-subtle); }
.rec-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-24);
  background: var(--error-subtle);
  color: var(--error);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}
.rec-badge svg { animation: rec-pulse 1s ease-in-out infinite; }
@keyframes rec-pulse { 50% { opacity: 0.35; } }

.audio-row { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.audio-dur { font-size: var(--text-xs); color: var(--text-secondary); min-width: 4ch; text-align: right; }
.audio-player { height: 40px; max-width: 260px; }

/* --- Attachments: tray, bubbles, viewer (§1.2/§1.3) ------------------------ */
.composer { position: relative; } /* anchor for .attach-menu */
.attach-menu {
  position: absolute;
  left: var(--sp-4);
  bottom: calc(100% + var(--sp-2));
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-12);
  box-shadow: var(--shadow-2);
  padding: var(--sp-1);
  z-index: 40;
  flex-direction: column;
}
.attach-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: var(--r-8);
  cursor: pointer;
  font-size: var(--text-sm);
  text-align: left;
}
.attach-item:hover { background: var(--surface-sunken); }

.attach-tray { border-top: 1px solid var(--border); background: var(--surface-sunken); padding: var(--sp-3) var(--sp-4); }
.tray-list { display: flex; flex-direction: column; gap: var(--sp-2); max-height: 32vh; overflow-y: auto; }
.tray-row { display: flex; align-items: center; gap: var(--sp-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-12); padding: var(--sp-2) var(--sp-3); }
.tray-row.failed { border-color: var(--error); }
.tray-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: var(--r-8); flex: none; }
.tray-ic { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; color: var(--text-secondary); flex: none; }
.tray-meta { min-width: 0; flex: 1; }
.tray-name { font-size: var(--text-sm); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-sub { font-size: var(--text-xs); color: var(--text-secondary); }
.tray-remove, .file-dl { flex: none; }
.tray-actions { display: flex; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-3); }

.image-bubble { padding: var(--sp-1); }
.media-loading { display: inline-block; padding: var(--sp-3); color: var(--text-tertiary); font-size: var(--text-sm); }
.msg-image { display: block; max-width: 320px; max-height: 320px; border-radius: var(--r-12); cursor: pointer; }
.image-view {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  z-index: 3000;
}
.image-view-img {
  max-width: min(96vw, 96vh);
  max-height: min(96vh, 96vw);
  border-radius: var(--r-12);
  will-change: transform;
  transform-origin: center center;
  touch-action: none;
}
.image-view-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.45);
}
.image-view-close:hover { background: rgba(0, 0, 0, 0.65); color: #fff; }

.file-bubble { display: flex; align-items: center; gap: var(--sp-3); min-width: 220px; }
.file-ic { color: var(--text-secondary); flex: none; }
.file-info { min-width: 0; flex: 1; }
.file-name { font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: var(--text-xs); color: var(--text-secondary); }

.voice-review { display: flex; flex-direction: column; gap: var(--sp-3); }
.voice-review h2 { margin: 0; }

/* --- Call overlay ----------------------------------------------------------- */
.call-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}
.call-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  width: min(520px, 92vw);
  padding: var(--sp-8) var(--sp-6);
  border-radius: var(--r-24);
  background: var(--surface);
  color: var(--text);
  text-align: center;
}
.call-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-subtle);
  color: var(--primary);
}
.call-title { font-size: var(--text-xl); font-weight: 700; margin-top: var(--sp-2); }
.call-sub { color: var(--text-tertiary); font-size: var(--text-sm); }
.call-actions { display: flex; gap: var(--sp-4); margin-top: var(--sp-2); }
.call-act {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), opacity var(--motion-fast) var(--ease-out);
  color: var(--text);
}
.call-act:hover { transform: scale(1.06); }
.call-act.active { color: var(--error); }
.call-accept { background: var(--primary); color: var(--primary-fg); }
.call-decline { background: var(--error); color: var(--danger-fg); }
.call-mic, .call-cam { background: var(--border-strong); }
.call-card.live { min-height: 320px; justify-content: center; }
.call-remote {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-24);
  background: #000;
}
.call-card.live audio.call-remote { position: static; background: none; }
.call-local {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 132px;
  height: 92px;
  object-fit: cover;
  border-radius: var(--r-12);
  border: 2px solid var(--border);
  background: #000;
  z-index: 1;
}
.live-sub { position: relative; z-index: 1; background: rgba(0, 0, 0, 0.45); padding: var(--sp-1) var(--sp-3); border-radius: var(--r-24); color: rgba(255, 255, 255, 0.85); }
.call-card.live .call-actions { position: relative; z-index: 1; margin-top: auto; padding-bottom: var(--sp-4); }

/* --- Lists / rows -------------------------------------------------------------- */
.row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-16);
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-out),
    transform var(--motion-fast) var(--ease-out);
}
.row:hover { background: var(--primary-subtle); }
.row:active { transform: scale(0.995); }
.row.active { background: var(--primary-subtle); }
.row-body { flex: 1; min-width: 0; }
.row-title {
  font-weight: 600;
  font-size: var(--text-md);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The "Encrypted" placeholder is secondary to a real preview; mute it. */
.row-sub.muted { color: var(--text-tertiary); }
.row-meta {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: none;
}
.row-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-status { display: flex; align-items: center; gap: 6px; }
.unread-dot {
  width: 10px; height: 10px; border-radius: var(--r-pill);
  background: var(--accent);
}
.unread-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-fg);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1;
}

/* --- Action list (chat / message menus) --------------------------------------- */
.action-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--sp-3);
}
.action-item {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: var(--sp-3);
  border-radius: var(--r-8);
  font-size: var(--text-md);
  cursor: pointer;
}
.action-item:hover { background: var(--surface-sunken); }

/* --- Avatar ------------------------------------------------------------------- */
.avatar {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-lg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.avatar.sm { width: 32px; height: 32px; font-size: var(--text-sm); }

/* --- Dialog / Toast ------------------------------------------------------------- */
.dialog-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  animation: fade var(--motion-fast) var(--ease-out);
}
.dialog {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-20);
  box-shadow: var(--shadow-4);
  max-width: 420px;
  width: calc(100% - 2 * var(--sp-4));
  max-height: calc(100vh - 2 * var(--sp-4));
  max-height: calc(100dvh - 2 * var(--sp-4));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--sp-6);
  animation: rise var(--motion-med) var(--ease-out);
}
.dialog h2 { margin-bottom: var(--sp-3); font-size: var(--text-xl); font-weight: 700; }
/* Segmented control (Settings > Appearance, Notifications). */
.seg {
  display: inline-flex;
  gap: var(--sp-1);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--r-12);
  padding: var(--sp-1);
}
.seg .btn {
  flex: 1;
  justify-content: center;
  padding: var(--sp-2) var(--sp-5);
  background: transparent;
  color: var(--text-secondary);
}
.seg .btn:hover:not([disabled]) { transform: none; color: var(--text); }
.seg .btn[aria-pressed="true"] {
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
}

.dialog-actions { display: flex; gap: var(--sp-3); justify-content: flex-end; margin-top: var(--sp-6); }

.toast-stack {
  position: fixed;
  bottom: var(--sp-4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  z-index: 200;
}
.toast {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-12);
  box-shadow: var(--shadow-3);
  font-size: var(--text-sm);
  animation: rise var(--motion-med) var(--ease-out);
  max-width: min(420px, calc(100vw - 2 * var(--sp-4)));
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}
/* Kind is shown with a small status dot rather than a side-tab border. */
.toast::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: var(--r-pill);
  background: var(--info);
}
.toast.error::before { background: var(--error); }
.toast.info::before { background: var(--info); }
.toast.success::before { background: var(--success); }
.toast.warn::before { background: var(--warning); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --- Typing indicator -------------------------------------------------------------- */
.typing-dots { display: inline-flex; gap: 3px; padding: var(--sp-2); }
.typing-dots i {
  width: 6px; height: 6px; border-radius: var(--r-pill);
  background: var(--text-tertiary);
  animation: blink var(--motion-slow) var(--ease-out) infinite;
}
.typing-dots i:nth-child(2) { animation-delay: 120ms; }
.typing-dots i:nth-child(3) { animation-delay: 240ms; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }

/* --- Skeleton/spinner ------------------------------------------------------------------ */
.spinner {
  width: 22px; height: 22px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: var(--r-pill);
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  padding: var(--sp-12) var(--sp-8);
  text-align: center;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
}
.empty-state svg { width: 56px; height: 56px; margin: 0 auto; opacity: 0.6; }
.empty-state h2 { color: var(--text); font-size: var(--text-xl); font-weight: 700; }
.empty-state p { max-width: 280px; line-height: 1.6; }

/* --- Banner ----------------------------------------------------------------------------- */
.banner {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-8);
  font-size: var(--text-sm);
}
.banner-warn { background: rgba(183, 121, 31, 0.14); color: var(--warning); }
.banner-danger { background: rgba(198, 63, 74, 0.14); color: var(--error); }
.banner-info { background: rgba(53, 101, 184, 0.12); color: var(--info); }

/* --- Theme toggle -------------------------------------------------------------------------- */
.theme-switch { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r-pill); overflow: hidden; }
.theme-switch button { padding: var(--sp-1) var(--sp-3); min-height: 44px; font-size: var(--text-xs); color: var(--text-secondary); }
.theme-switch button[aria-pressed="true"] { background: var(--primary); color: var(--primary-fg); }

/* --- Disappearing messages ----------------------------------------------------------------- */
.chat-timer { margin-left: var(--sp-2); }
.disappearing-banner {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: var(--surface-sunken);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border);
}
.disappearing-banner svg { color: var(--warning); flex: none; }

.msg-expiry { display: inline-flex; align-items: center; gap: 3px; color: var(--text-tertiary); }
.msg-expiry svg { color: var(--warning); }

.timer-options { display: flex; flex-direction: column; gap: var(--sp-1); margin-top: var(--sp-3); }
.timer-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3);
  border-radius: var(--r-12);
  color: var(--text);
  text-align: left;
}
.timer-option:hover { background: var(--primary-subtle); }
.timer-option.active { color: var(--primary); font-weight: 600; }

.temp-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-right: auto;
}
.temp-toggle.on { color: var(--warning); border-color: var(--warning); }
.voice-review-opts { display: flex; }