/* PP Ops Texting — scoped styles. Inspired by clean SaaS messaging UIs
 * (search bar + tabs + colored avatars + soft cards), brand-adapted to PP
 * teal + orange. Every rule prefixed `.tx-` so nothing leaks.
 */

/* All parent-targeting rules removed per Lexi's call. The visual imbalance
 * we keep chasing (bigger empty space below the texting card than above)
 * is caused by the parent .report-pane having asymmetric padding
 * (0.25rem top vs 1rem bottom) plus the dashboard's date stamp below.
 * Compensating purely from within .tx-shell is impossible — we can only
 * push our own box around, not erase what's outside it. So we accept the
 * dashboard's natural framing and move on. */

.tx-shell {
  --tx-teal: var(--pp-teal, #00695C);
  --tx-teal-dark: var(--pp-teal-dark, #004D40);
  --tx-teal-deep: var(--pp-teal-deep, #053F36);
  --tx-mint: var(--pp-mint, #B2E0D8);
  --tx-mint-soft: var(--pp-mint-soft, #D7EFEA);
  --tx-mint-pale: var(--pp-mint-pale, #EAF7F4);
  --tx-orange: var(--pp-orange, #E58B3A);
  --tx-orange-soft: #FAE3CB;
  --tx-orange-deep: #B86A22;
  --tx-charcoal: var(--pp-charcoal, #2C2C2C);
  --tx-grey-dark: var(--pp-grey-dark, #555);
  --tx-grey-mid: var(--pp-grey-mid, #999);
  --tx-grey-light: #E8EEEC;
  --tx-grey-bg: #F5F8F7;
  --tx-card: #FFFFFF;
  --tx-radius: 14px;
  --tx-radius-sm: 8px;
  --tx-radius-pill: 999px;
  --tx-shadow-card: 0 1px 2px rgba(0, 77, 64, 0.06), 0 6px 18px rgba(0, 77, 64, 0.04);
  --tx-shadow-row: 0 1px 0 rgba(0, 77, 64, 0.04);

  /* Single teal gradient for all contact avatars (Lexi's call: name initials
   * in tiny teal circles, no rainbow). Sender (user) avatars on outbound
   * message bubbles use the orange palette below to read as "you/our staff". */
  --tx-av-contact: linear-gradient(135deg, #00695C, #014A40);
  --tx-av-sender:  linear-gradient(135deg, #E58B3A, #C46B17);

  display: flex;
  flex-direction: column;
  /* Fill the available vertical space inside the dashboard's content area.
   * Tighter calc so the card extends further down without overlapping the
   * dashboard's date stamp (which sits ~32px below the report-pane). */
  height: calc(100vh - 60px);
  min-height: 580px;
  margin: 0;
  background: var(--tx-mint-soft);
  border-radius: var(--tx-radius);
  box-shadow: var(--tx-shadow-card);
  overflow: hidden;
  color: var(--tx-charcoal);
}

/* ── sticky banner (gradient header) ─────────────────────────── */
.tx-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--tx-teal) 0%, var(--tx-teal-dark) 100%);
  color: #fff;
  font-size: 14px;
  border-bottom: 3px solid var(--tx-orange);
}
.tx-banner__label {
  text-transform: uppercase;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
}

/* logged-in user identity badge — sits on the LEFT of the banner */
.tx-banner__user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.tx-banner__user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--tx-orange);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(229, 139, 58, 0.3);
}
.tx-banner__user-name {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  letter-spacing: -0.01em;
}
.tx-banner__divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.25);
  margin: 0 4px;
}
.tx-banner__line {
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}
.tx-banner__phone {
  font-weight: 600;
  color: var(--tx-mint-soft);
  font-variant-numeric: tabular-nums;
}
.tx-banner__phone--placeholder {
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
  font-weight: 500;
  font-size: 12.5px;
}
.tx-banner__picker {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tx-banner__picker-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 700;
}
.tx-banner__picker select {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 32px 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--tx-radius-pill);
  background-color: rgba(255, 255, 255, 0.14);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path fill='%23ffffff' d='M5 7L1 3h8z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  outline: none;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.tx-banner__picker select:hover {
  background-color: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.5);
}
.tx-banner__picker select:focus {
  background-color: rgba(255, 255, 255, 0.22);
  border-color: var(--tx-orange);
  box-shadow: 0 0 0 2px rgba(229, 139, 58, 0.4);
}
.tx-banner__picker select option { color: var(--tx-grey-dark); background: #fff; }

/* ── 2-pane grid ──────────────────────────────────────────────── */
.tx-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  padding: 0;
  flex: 1;
  min-height: 0;
}

/* ── inbox left ───────────────────────────────────────────────── */
.tx-inbox {
  display: flex;
  flex-direction: column;
  background: var(--tx-card);
  border-right: 1px solid var(--tx-grey-light);
  min-width: 0;
  overflow: hidden;
}
.tx-inbox__head {
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--tx-grey-light);
  display: flex; flex-direction: column; gap: 12px;
}
.tx-inbox__title-row {
  display: flex; align-items: center; justify-content: space-between;
}
.tx-inbox__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--tx-charcoal);
  letter-spacing: -0.01em;
}
/* compose icon button, sits next to the "Conversations" title */
.tx-newbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  padding: 0;
  background: var(--tx-mint-soft);
  color: var(--tx-teal);
  border: 0;
  border-radius: var(--tx-radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.tx-newbtn:hover {
  background: var(--tx-orange);
  color: #fff;
  transform: translateY(-1px);
}
.tx-newbtn:active { transform: translateY(0); }
.tx-newbtn__icon {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; line-height: 1;
}

/* search */
.tx-search {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  background: var(--tx-grey-bg);
  border: 1px solid var(--tx-grey-light);
  border-radius: var(--tx-radius-pill);
  transition: border-color 0.15s, background 0.15s;
}
.tx-search:focus-within {
  border-color: var(--tx-teal);
  background: #fff;
  box-shadow: 0 0 0 3px var(--tx-mint-soft);
}
.tx-search__icon { color: var(--tx-grey-mid); flex: 0 0 auto; }
.tx-search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 13px; color: var(--tx-grey-dark);
}
.tx-search input::placeholder { color: var(--tx-grey-mid); }

/* admin-only per-user filter dropdown next to the pill row */
.tx-admin-userfilter {
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid var(--tx-grey-light);
  border-radius: var(--tx-radius-pill);
  background: var(--tx-grey-bg);
  color: var(--tx-grey-dark);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  max-width: 160px;
}
.tx-admin-userfilter:hover { background: var(--tx-mint-pale); border-color: var(--tx-mint); }
.tx-admin-userfilter:focus { border-color: var(--tx-teal); box-shadow: 0 0 0 2px var(--tx-mint-soft); background: #fff; }

/* filter pills row */
.tx-tabs {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px 14px;
  background: var(--tx-card);
  border-bottom: 1px solid var(--tx-grey-light);
}
.tx-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--tx-grey-dark);
  cursor: pointer;
  border-radius: var(--tx-radius-pill);
  transition: background 0.15s, color 0.15s;
}
.tx-tab:hover { color: var(--tx-charcoal); background: var(--tx-mint-pale); }
.tx-tab.is-active {
  color: #fff;
  background: var(--tx-teal);
  box-shadow: 0 2px 8px rgba(0, 105, 92, 0.25);
}
.tx-tab__count {
  display: inline-block;
  min-width: 18px; padding: 0 6px;
  background: var(--tx-mint-soft);
  color: var(--tx-teal-dark);
  border-radius: var(--tx-radius-pill);
  font-size: 10.5px; font-weight: 800;
  line-height: 16px;
}
.tx-tab.is-active .tx-tab__count {
  background: var(--tx-orange);
  color: #fff;
}

.tx-inbox__list {
  flex: 1;
  overflow-y: auto;
  background: var(--tx-card);
  /* mint-themed scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--tx-mint-soft) transparent;
}
.tx-inbox__list::-webkit-scrollbar { width: 8px; }
.tx-inbox__list::-webkit-scrollbar-track { background: transparent; }
.tx-inbox__list::-webkit-scrollbar-thumb {
  background: var(--tx-mint-soft);
  border-radius: 999px;
  border: 2px solid transparent;
}
.tx-inbox__list::-webkit-scrollbar-thumb:hover { background: var(--tx-mint); }

.tx-row {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--tx-grey-light);
  text-align: left;
  cursor: pointer;
  font: inherit;
  position: relative;
  transition: background 0.12s;
}
.tx-row:hover { background: var(--tx-mint-pale); }
.tx-row.is-active {
  background: var(--tx-mint-soft);
  box-shadow: inset 4px 0 0 var(--tx-orange);
}
.tx-row__avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}
.tx-row__avatar--contact { background: var(--tx-av-contact); }
.tx-row__avatar--sender  { background: var(--tx-av-sender); }

.tx-row__body { min-width: 0; }
.tx-row__top {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px;
}
.tx-row__name {
  font-weight: 700;
  font-size: 14px;
  color: var(--tx-charcoal);
  flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tx-row__time {
  flex: 0 0 auto;
  color: var(--tx-grey-mid);
  font-size: 11.5px;
  font-weight: 500;
}
.tx-row__phone {
  font-size: 11px;
  color: var(--tx-grey-mid);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  margin-bottom: 3px;
}
.tx-row__preview {
  font-size: 12.5px;
  color: var(--tx-grey-dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
  margin-bottom: 4px;
}
.tx-row__meta {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.tx-row__statuspill {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--tx-radius-pill);
  white-space: nowrap;
  background: var(--tx-mint-soft);
  color: var(--tx-teal-dark);
  white-space: nowrap;
}
.tx-row__statuspill--lead { background: var(--tx-orange-soft); color: var(--tx-orange-deep); }
.tx-row__linebadge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--tx-mint);
  color: var(--tx-teal-deep);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tx-row__unread {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 4px;
  background: var(--tx-orange);
  color: #fff;
  border-radius: var(--tx-radius-pill);
  min-width: 22px; height: 22px;
  padding: 0 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 800;
  box-shadow: 0 2px 6px rgba(229, 139, 58, 0.36);
}

/* ── thread pane ──────────────────────────────────────────────── */
.tx-thread {
  display: flex;
  flex-direction: column;
  background: var(--tx-card);
  min-width: 0;
  overflow: hidden;
}
.tx-thread__placeholder {
  margin: auto;
  padding: 60px 40px;
  text-align: center;
  color: var(--tx-grey-mid);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.tx-thread__placeholder-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--tx-mint-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin-bottom: 4px;
  border: 3px dashed var(--tx-mint);
}
.tx-thread__placeholder-title {
  font-weight: 700; font-size: 18px; color: var(--tx-charcoal);
}
.tx-thread__placeholder-sub {
  font-size: 13px; color: var(--tx-grey-mid); max-width: 320px; line-height: 1.5;
}

.tx-thread__head {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--tx-grey-light);
  background: linear-gradient(180deg, var(--tx-mint-pale), var(--tx-card));
}
.tx-thread__avatar {
  width: 46px; height: 46px;
  border-radius: 12px;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.tx-thread__heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tx-thread__name { font-weight: 800; font-size: 16px; color: var(--tx-charcoal); letter-spacing: -0.01em; }
.tx-thread__sub { font-size: 12.5px; color: var(--tx-grey-dark); font-variant-numeric: tabular-nums; }
.tx-thread__statuses { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.tx-thread__newto {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--tx-grey-light);
  background: var(--tx-mint-pale);
}
.tx-thread__newto label {
  font-size: 11px; font-weight: 800;
  color: var(--tx-grey-dark);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.tx-thread__newto input {
  flex: 1; padding: 8px 12px;
  border: 1px solid var(--tx-grey-light);
  border-radius: var(--tx-radius-sm);
  background: #fff;
  font-size: 14px; font-variant-numeric: tabular-nums;
  color: var(--tx-grey-dark);
}
.tx-thread__newto input:focus {
  outline: none; border-color: var(--tx-teal);
  box-shadow: 0 0 0 3px var(--tx-mint-soft);
}

.tx-thread__messages {
  flex: 1; overflow-y: auto;
  padding: 24px 26px;
  display: flex; flex-direction: column; gap: 8px;
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: var(--tx-mint-soft) transparent;
}
.tx-thread__messages::-webkit-scrollbar { width: 8px; }
.tx-thread__messages::-webkit-scrollbar-track { background: transparent; }
.tx-thread__messages::-webkit-scrollbar-thumb {
  background: var(--tx-mint-soft);
  border-radius: 999px;
  border: 2px solid transparent;
}
.tx-thread__messages::-webkit-scrollbar-thumb:hover { background: var(--tx-teal); }
.tx-thread__messages--empty { justify-content: center; align-items: center; }

.tx-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 75%;
  max-width: 75%;
}
.tx-msg--in { align-self: flex-start; }
.tx-msg--out { align-self: flex-end; flex-direction: row-reverse; }
.tx-msg__avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  flex: 0 0 auto;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; /* aligns with the bubble bottom, above the time line */
}
.tx-msg__col {
  display: flex; flex-direction: column;
  flex: 1;
  min-width: 0;
}
.tx-msg--out .tx-msg__col { align-items: flex-end; }
.tx-msg__bubble {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap; word-break: break-word;
  background: transparent;
}
.tx-msg--in .tx-msg__bubble {
  background: var(--tx-mint-soft);
  color: var(--tx-charcoal);
  border: none;
  border-top-left-radius: 4px;
}
.tx-msg--out .tx-msg__bubble {
  background: rgba(250, 227, 203, 0.40);
  color: var(--tx-charcoal);
  border: none;
  border-top-right-radius: 4px;
}
.tx-msg__sender {
  font-size: 10px; font-weight: 800;
  opacity: 0.78; margin-bottom: 3px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.tx-msg__time {
  font-size: 11px; color: var(--tx-grey-mid);
  margin-top: 4px; padding: 0 4px;
  font-weight: 500;
}
.tx-msg__body { white-space: pre-wrap; }

/* ── composer ────────────────────────────────────────────────── */
.tx-composer {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--tx-grey-light);
  background: var(--tx-card);
}
.tx-composer__input {
  flex: 1; resize: none;
  padding: 9px 14px;
  border: 1px solid var(--tx-grey-light);
  border-radius: 18px;
  font-family: inherit;
  font-size: 14px; line-height: 1.4;
  outline: none;
  max-height: 110px;
  background: var(--tx-grey-bg);
  color: var(--tx-grey-dark);
  transition: border-color 0.15s, background 0.15s;
}
.tx-composer__input:focus {
  border-color: var(--tx-teal); background: #fff;
  box-shadow: 0 0 0 3px var(--tx-mint-soft);
}
.tx-composer__send {
  padding: 9px 22px;
  border: none;
  border-radius: 18px;
  background: var(--tx-orange);
  color: #fff;
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.06em;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(229, 139, 58, 0.32);
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
}
.tx-composer__send:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(229, 139, 58, 0.42);
}
.tx-composer__send:active:not(:disabled) { transform: translateY(0); }
.tx-composer__send:disabled {
  opacity: 0.4; cursor: not-allowed; box-shadow: none;
}

/* ── empty state ─────────────────────────────────────────────── */
.tx-empty {
  padding: 40px 22px;
  text-align: center;
  color: var(--tx-grey-mid);
  font-size: 13.5px; line-height: 1.5;
}
.tx-empty strong { color: var(--tx-charcoal); }

/* ── responsive ──────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .tx-grid { grid-template-columns: 1fr; }
  .tx-inbox { max-height: 320px; }
}

/* iPhone (SF Pro) font for chat content 2026-05-07 */
.tx-msg__bubble,
.tx-msg__body,
.tx-msg__sender,
.tx-msg__time {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", system-ui, "Segoe UI", Roboto, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", Arial, sans-serif;
  letter-spacing: -0.01em;
}

/* emoji + iPhone font on composer 2026-05-07 */
.tx-composer__input {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", "Segoe UI", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", Arial, sans-serif;
  letter-spacing: -0.01em;
}
.tx-composer__emoji {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--tx-grey-light);
  border-radius: 50%;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.tx-composer__emoji:hover { background: var(--tx-mint-pale); border-color: var(--tx-mint); }
.tx-emoji-pop {
  position: absolute;
  bottom: 56px;
  background: #fff;
  border: 1px solid var(--tx-grey-light);
  border-radius: 12px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(8, 28px);
  gap: 4px;
  box-shadow: 0 8px 24px rgba(0, 77, 64, 0.10);
  z-index: 10;
}
.tx-emoji-pop button {
  width: 28px; height: 28px;
  border: none; background: transparent;
  font-size: 18px;
  cursor: pointer;
  border-radius: 6px;
}
.tx-emoji-pop button:hover { background: var(--tx-mint-pale); }

/* client id chip 2026-05-07 */
.tx-row__clientid { color: var(--tx-grey-mid); font-weight: 500; }

/* MMS media in bubbles 2026-05-07 */
.tx-msg__media {
  display: block;
  margin-top: 6px;
  border-radius: 12px;
  overflow: hidden;
  max-width: 100%;
}
.tx-msg__media--image img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  border-radius: 12px;
  cursor: zoom-in;
  background: rgba(0, 0, 0, 0.04);
}
.tx-msg__media--audio { width: 100%; max-width: 360px; height: 36px; }
.tx-msg__media--video { width: 100%; max-width: 360px; max-height: 360px; border-radius: 12px; }
.tx-msg__media--file {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--tx-grey-light);
  border-radius: 999px;
  text-decoration: none;
  color: var(--tx-charcoal);
  font-size: 13px;
}
.tx-msg__media--file:hover { background: rgba(0, 0, 0, 0.07); }
.tx-msg__media-icon { font-size: 14px; }
.tx-msg__media-name { font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* MMS composer icons + media chip 2026-05-07 */
.tx-composer-wrap { display: flex; flex-direction: column; }
.tx-composer-media:not([hidden]) {
  padding: 8px 12px 0;
  display: flex;
}
.tx-comp-preview {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 6px;
  background: var(--tx-mint-pale);
  border: 1px solid var(--tx-mint-soft);
  border-radius: 12px;
  max-width: 320px;
}
.tx-comp-preview__img {
  display: block; max-width: 80px; max-height: 80px;
  border-radius: 8px; object-fit: cover;
}
.tx-comp-preview__audio { height: 32px; min-width: 220px; }
.tx-comp-preview__video { max-width: 200px; max-height: 120px; border-radius: 8px; }
.tx-comp-preview__file { font-size: 13px; padding: 4px 8px; }
.tx-comp-preview__x {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px;
  border: none; border-radius: 50%;
  background: var(--tx-charcoal); color: #fff;
  font-size: 14px; line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.tx-comp-icon {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--tx-grey-mid);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tx-comp-icon:hover { background: var(--tx-mint-pale); color: var(--tx-teal); }
.tx-comp-icon--mic.is-recording {
  color: #fff; background: #d23434;
  animation: tx-mic-pulse 1.1s infinite;
}
@keyframes tx-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(210, 52, 52, 0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(210, 52, 52, 0); }
}


/* 2026-05-11 — X dismiss button on inbox rows (per-user hide). */
.tx-row__dismiss {
  background: transparent;
  border: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  color: #bbb;
  font-size: 16px; line-height: 22px; padding: 0;
  margin-left: 8px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease, background 120ms ease, color 120ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.tx-row:hover .tx-row__dismiss { opacity: 1; }
.tx-row__dismiss:hover { background: rgba(0,0,0,.06); color: #555; }


/* 2026-05-11 seen-by stamp on inbox row */
.tx-row__seenby {
  display: inline-block;
  font-size: 11px;
  color: #888;
  margin-left: 6px;
  font-style: italic;
}


/* 2026-05-11 per-bubble line label */
.tx-msg__lineline {
  opacity: 0.55;
  font-weight: 400;
  margin-left: 4px;
}


/* 2026-05-11 Link-to-client button on thread header */
.tx-thread__link-btn {
  background: var(--tx-mint);
  color: var(--tx-teal-deep);
  border: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 8px;
}
.tx-thread__link-btn:hover {
  background: var(--tx-teal-deep);
  color: #fff;
}


/* 2026-05-11 Mark-unread button on thread header */
.tx-thread__unread-btn {
  background: transparent;
  color: var(--tx-grey-mid);
  border: 1px solid var(--tx-grey-light);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 8px;
}
.tx-thread__unread-btn:hover {
  background: var(--tx-mint);
  color: var(--tx-teal-deep);
  border-color: var(--tx-teal-deep);
}
