/* ==========================================================================
   ListKr CHAT HUB - header popup + bottom chat windows + minimised bubbles
   Scoped under .tx-dock / .tx-dw so it never touches the site theme.
   ========================================================================== */

.tx-dock, .tx-dock * { box-sizing: border-box; }

.tx-dock {
  --p: #003fb1;
  --p-dark: #002a7a;
  --p-light: #dbe1ff;
  --p-glow: rgba(0, 63, 177, .22);
  --bg: #F5F7FB;
  --ink: #0B1B34;
  --ink-2: #5A6B85;
  --ink-3: #8A99B0;
  --line: #E4E9F2;
  --ok: #17B26A;
  --warn: #F79009;
  --danger: #E5484D;
  --r: 12px;
  --sh-1: 0 2px 8px rgba(11, 27, 52, .06);
  --sh-2: 0 8px 24px rgba(11, 27, 52, .10);
  --sh-3: 0 18px 48px rgba(11, 27, 52, .16);

  position: fixed;
  inset: 0;
  z-index: 9500;
  pointer-events: none;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.tx-dock > * { pointer-events: auto; }
.tx-dock button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.tx-dock .lu { width: 18px; height: 18px; flex: none; stroke-width: 2; }
.tx-dock .lu-sm { width: 15px; height: 15px; }
.tx-dock .lu-lg { width: 22px; height: 22px; }

/* ==========================================================================
   Header trigger - the only way into the dock (no bottom floating button)
   ========================================================================== */
.tx-hdr-chat {
  position: relative;
  width: 42px;
  height: 42px;
  flex: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #003fb1;
  box-shadow: 0 4px 12px rgba(0, 63, 177, .30), inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: transform .18s cubic-bezier(.34, 1.4, .64, 1), box-shadow .18s ease, filter .18s ease;
}
.tx-hdr-chat::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, .22);
  pointer-events: none;
}
.tx-hdr-chat:hover { transform: translateY(-2px); filter: saturate(1.08); box-shadow: 0 8px 20px rgba(25, 118, 210, .38); background: #1a56db; }
.tx-hdr-chat:active { transform: translateY(0) scale(.96); }
.tx-hdr-chat .tx-hdr-chat-ico { display: inline-flex; }
.tx-hdr-chat .lu { width: 20px; height: 20px; stroke-width: 2.1; }
.tx-dock-open-state .tx-hdr-chat,
.tx-hdr-chat.tx-active { box-shadow: 0 0 0 3px rgba(0, 63, 177, .22), 0 6px 16px rgba(0, 63, 177, .34); }

.tx-hdr-chat-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #E5484D;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(229, 72, 77, .4);
  animation: txDkPop .3s cubic-bezier(.34, 1.4, .64, 1) both;
}

/* ==========================================================================
   Bottom row of open chat windows (newest on the right)
   ========================================================================== */
.tx-dock-wins {
  position: fixed;
  right: 94px;
  bottom: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 12px;
  max-width: calc(100vw - 120px);
  line-height: 0;
  transition: right .22s cubic-bezier(.34, 1.3, .64, 1);
}

/* ==========================================================================
   Minimised chats - floating avatar bubbles
   ========================================================================== */
.tx-dock-bubbles {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 12px;
}
.tx-dock-bub {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 6px 18px rgba(11, 27, 52, .20), 0 2px 6px rgba(11, 27, 52, .12);
  animation: txDkPop .28s cubic-bezier(.34, 1.4, .64, 1) both;
  transition: transform .18s cubic-bezier(.34, 1.4, .64, 1);
}
.tx-dock-bub:hover { transform: scale(1.08); }
.tx-dock-bub-av {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid #fff;
}
.tx-dock-bub-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tx-dock-bub-av .tx-dock-ini {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--p-light); color: var(--p);
  font-weight: 800; font-size: 17px;
}
.tx-dock-bub-pres {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ink-3);
  border: 2.5px solid #fff;
}
.tx-dock-bub-pres.tx-on { background: var(--ok); }
.tx-dock-bub-badge {
  position: absolute;
  top: -3px;
  left: -3px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 21px;
  text-align: center;
  border: 2px solid #fff;
}
.tx-dock-bub-x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.7);
  transition: opacity .16s ease, transform .16s ease;
}
.tx-dock-bub-x .lu { width: 12px; height: 12px; }
.tx-dock-bub:hover .tx-dock-bub-x { opacity: 1; transform: scale(1); }
.tx-dock-bub-name {
  position: absolute;
  right: 64px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.tx-dock-bub:hover .tx-dock-bub-name { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ---------------- chat list panel ---------------- */
.tx-dock-panel {
  position: fixed;
  right: 18px;
  top: 72px;
  width: 348px;
  max-height: min(560px, calc(100vh - 110px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh-3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px) scale(.97);
  transform-origin: top right;
  transition: opacity .18s ease, transform .2s cubic-bezier(.34, 1.3, .64, 1), visibility .2s;
}
.tx-dock.tx-list-open .tx-dock-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.tx-dock-phead { padding: 15px 16px 12px; border-bottom: 1px solid var(--line); }
.tx-dock-ptop { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.tx-dock-title { font-size: 17px; font-weight: 800; letter-spacing: -.3px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.tx-dock-title em {
  font-style: normal; font-size: 11px; font-weight: 700;
  background: var(--p-light); color: var(--p);
  padding: 2px 7px; border-radius: 999px; flex: none;
}
.tx-dock-x {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3); transition: all .15s ease;
}
.tx-dock-x:hover { background: var(--bg); color: var(--ink); }

/* the "open full page" button lives at the top of the dropdown */
.tx-dock-open {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--p) 0%, var(--p-dark) 100%);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 6px 16px var(--p-glow);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
  position: relative;
  overflow: hidden;
}
.tx-dock-open:hover { transform: translateY(-1px); box-shadow: 0 10px 22px var(--p-glow); filter: brightness(1.05); }
.tx-dock-open:active { transform: translateY(0); }

.tx-dock-search {
  margin-top: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg);
  border: 1.5px solid transparent;
  transition: border-color .16s ease, background .16s ease;
}
.tx-dock-search:focus-within { background: #fff; border-color: var(--p); box-shadow: 0 0 0 3px var(--p-glow); }
.tx-dock-search .lu { color: var(--ink-3); }
.tx-dock-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font-size: 13.5px; color: var(--ink);
}
.tx-dock-search input::placeholder { color: var(--ink-3); }

/* ---------------- conversation rows ---------------- */
.tx-dock-list { flex: 1; overflow-y: auto; padding: 7px; min-height: 90px; }
.tx-dock-list::-webkit-scrollbar { width: 6px; }
.tx-dock-list::-webkit-scrollbar-thumb { background: #D3DBE8; border-radius: 3px; }
.tx-dock-list::-webkit-scrollbar-thumb:hover { background: #B9C5D8; }

.tx-dock-row {
  display: flex;
  gap: 11px;
  width: 100%;
  padding: 10px;
  border-radius: var(--r);
  text-align: left;
  align-items: center;
  transition: background .15s ease;
  animation: txDkIn .26s ease both;
  min-width: 0;
}
.tx-dock-row:hover { background: var(--bg); }
.tx-dock-row.tx-active { background: var(--p-light); }

.tx-dock-av { position: relative; width: 44px; height: 44px; flex: none; }
.tx-dock-av img, .tx-dock-av .tx-dock-ini {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: block;
}
.tx-dock-ini {
  background: linear-gradient(135deg, var(--p) 0%, var(--p-dark) 100%);
  color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.tx-dock-pres {
  position: absolute; right: -1px; bottom: -1px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--ink-3); border: 2.5px solid #fff;
}
.tx-dock-pres.tx-on { background: var(--ok); }
.tx-dock-pres.tx-on::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--ok); opacity: .55; animation: txDkRing 2s ease-out infinite;
}

.tx-dock-main { flex: 1; min-width: 0; overflow: hidden; }
.tx-dock-r1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tx-dock-name {
  font-size: 13.5px; font-weight: 700; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tx-dock-vb { color: var(--p); flex: none; }
.tx-dock-vb .lu { width: 13px; height: 13px; }
.tx-dock-time { margin-left: auto; font-size: 11px; color: var(--ink-3); font-weight: 600; flex: none; }
.tx-dock-prod {
  font-size: 11.5px; color: var(--p); font-weight: 600; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tx-dock-last {
  display: flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--ink-2); margin-top: 1px; min-width: 0;
}
.tx-dock-last span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-dock-row.tx-unread .tx-dock-name { font-weight: 800; }
.tx-dock-row.tx-unread .tx-dock-last { color: var(--ink); font-weight: 600; }
.tx-dock-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--p); color: #fff; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.tx-dock-flags { display: flex; gap: 4px; color: var(--ink-3); flex: none; }
.tx-dock-flags .lu { width: 12px; height: 12px; }

.tx-dock-empty {
  padding: 34px 20px; text-align: center; color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.tx-dock-empty .lu { width: 34px; height: 34px; color: #C6D0E0; }
.tx-dock-empty b { color: var(--ink-2); font-size: 13.5px; }

.tx-dock-pfoot {
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
}
.tx-dock-pfoot .lu { width: 13px; height: 13px; color: var(--ok); }

/* ==========================================================================
   Chat windows - up to three sit side by side along the bottom
   ========================================================================== */

.tx-dw {
  position: relative;
  flex: none;
  vertical-align: bottom;
  line-height: 1.45;
  width: 330px;
  height: min(455px, calc(100vh - 120px));
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -2px 14px rgba(11, 27, 52, .10), 0 12px 34px rgba(11, 27, 52, .16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(22px);
  transform-origin: bottom center;
  transition: opacity .18s ease, transform .22s cubic-bezier(.34, 1.3, .64, 1), visibility .22s;
}
.tx-dw.tx-open { opacity: 1; visibility: visible; transform: translateY(0); }
.tx-dw.tx-pulse { animation: txDkNudge .45s ease; }

.tx-dw.tx-min { height: 54px; }
.tx-dw.tx-min .tx-dw-prod,
.tx-dw.tx-min .tx-dw-scroll,
.tx-dw.tx-min .tx-dw-quick,
.tx-dw.tx-min .tx-dw-qwrap,
.tx-dw.tx-min .tx-dw-comp { display: none; }

/* ---------------- window header ---------------- */
.tx-dw-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 13px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  flex: none;
  min-height: 54px;
}
.tx-dw-av { position: relative; width: 36px; height: 36px; flex: none; }
.tx-dw-av img, .tx-dw-av .tx-dock-ini { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; }
.tx-dw-av .tx-dock-ini { font-size: 13px; }
.tx-dw-id { flex: 1; min-width: 0; }
.tx-dw-name {
  font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tx-dw-sub { font-size: 11.5px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.tx-dw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.tx-dw-dot.tx-on { background: var(--ok); }
.tx-dw-acts { display: flex; gap: 1px; flex: none; }
.tx-dw-ib {
  flex: none;
  width: 30px; height: 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); transition: all .15s ease;
}
.tx-dw-ib:hover { background: var(--p-light); color: var(--p); }
.tx-dw-ib.tx-dw-close:hover { background: #FDECEC; color: var(--danger); }

/* ---------------- window body ----------------
   dock.js wraps the product strip, message scroller, quick replies and the
   composer in .tx-dw-body. It must be a column flex box that fills the leftover
   height, otherwise .tx-dw-scroll cannot shrink and the composer is pushed off
   the bottom of the screen. */
.tx-dw-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------------- product strip ---------------- */
.tx-dw-prod {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  flex: none;
}
.tx-dw-prod img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; flex: none; }
.tx-dw-pinfo { flex: 1; min-width: 0; }
.tx-dw-ptitle {
  /* must be a block: text-overflow/ellipsis is ignored on inline elements,
     which let long listing titles overflow the whole product strip */
  display: block;
  max-width: 100%;
  font-size: 12px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tx-dw-pmeta { display: flex; align-items: center; gap: 7px; margin-top: 2px; min-width: 0; }
.tx-dw-price {
  font-size: 12.5px; font-weight: 800; color: var(--p);
  flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tx-dw-chip {
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .3px;
  flex: none; white-space: nowrap;
}
.tx-dw-chip.tx-avail { background: #E7F8EF; color: var(--ok); }
.tx-dw-chip.tx-reserved { background: #FEF3E2; color: var(--warn); }
.tx-dw-chip.tx-sold { background: #FDECEC; color: var(--danger); }

/* ---------------- messages ---------------- */
.tx-dw-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 13px 6px;
  background: #fff;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tx-dw-scroll::-webkit-scrollbar { width: 6px; }
.tx-dw-scroll::-webkit-scrollbar-thumb { background: #D3DBE8; border-radius: 3px; }

.tx-dw-e2e {
  display: flex; align-items: center; gap: 6px; justify-content: center;
  font-size: 10.5px; color: var(--ink-3); font-weight: 600;
  background: var(--bg); border-radius: 999px;
  padding: 5px 11px; margin: 0 auto 12px; max-width: 100%;
  text-align: center;
}
.tx-dw-e2e .lu { width: 12px; height: 12px; color: var(--ok); flex: none; }

.tx-dw-sep {
  text-align: center; font-size: 10.5px; font-weight: 700; color: var(--ink-3);
  margin: 10px 0 6px; text-transform: uppercase; letter-spacing: .4px;
}

.tx-dw-row { display: flex; gap: 7px; align-items: flex-end; margin-bottom: 2px; animation: txDkSlide .26s ease both; }
.tx-dw-row.tx-me { flex-direction: row-reverse; }
.tx-dw-rav { width: 24px; height: 24px; flex: none; }
.tx-dw-rav img, .tx-dw-rav .tx-dock-ini { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; display: block; }
.tx-dw-rav .tx-dock-ini { font-size: 9px; }
.tx-dw-rav.tx-hide { visibility: hidden; }

.tx-dw-bub {
  max-width: 74%;
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--ink);
  word-wrap: break-word;
  overflow-wrap: anywhere;
  border-bottom-left-radius: 5px;
}
.tx-dw-row.tx-me .tx-dw-bub {
  background: linear-gradient(135deg, var(--p) 0%, var(--p-dark) 100%);
  color: #fff;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 5px;
}
.tx-dw-bub img { max-width: 100%; border-radius: 10px; display: block; margin: 2px 0; }
.tx-dw-att {
  display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
}
.tx-dw-att .lu { width: 15px; height: 15px; flex: none; }

.tx-dw-meta {
  display: flex; align-items: center; gap: 4px; justify-content: flex-end;
  font-size: 10px; color: var(--ink-3); margin: 2px 2px 6px;
}
.tx-dw-row.tx-me + .tx-dw-meta { margin-right: 2px; }
.tx-dw-tick { color: var(--ink-3); }
.tx-dw-tick.tx-seen { color: var(--p); }
.tx-dw-tick .lu { width: 13px; height: 13px; }

.tx-dw-sys {
  text-align: center; font-size: 11px; color: var(--ink-3);
  background: var(--bg); border-radius: 999px; padding: 5px 12px;
  margin: 7px auto; max-width: 90%; font-weight: 600;
}

.tx-dw-typing { display: flex; gap: 7px; align-items: flex-end; margin-bottom: 6px; }
.tx-dw-tbub {
  background: var(--bg); border-radius: 16px; border-bottom-left-radius: 5px;
  padding: 11px 13px; display: flex; gap: 4px; align-items: center;
}
.tx-dw-tbub i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3);
  display: block; animation: txDkType 1.3s infinite ease-in-out;
}
.tx-dw-tbub i:nth-child(2) { animation-delay: .18s; }
.tx-dw-tbub i:nth-child(3) { animation-delay: .36s; }

/* ---------------- quick replies ----------------
   Six chips are far wider than a 330px window, so the row scrolls sideways.
   The wrapper adds arrows and edge fades, otherwise the options past the
   right edge are invisible and unreachable. */
.tx-dw-qwrap {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
}
.tx-dw-quick {
  display: flex; gap: 6px; padding: 8px 13px 2px;
  overflow-x: auto; scrollbar-width: none;
  flex: 1 1 auto; min-width: 0;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.tx-dw-quick::-webkit-scrollbar { display: none; }

/* edge fades hint that the row continues */
.tx-dw-qwrap::before,
.tx-dw-qwrap::after {
  content: "";
  position: absolute; top: 0; bottom: 0; width: 38px;
  pointer-events: none; z-index: 1;
  opacity: 0; transition: opacity .16s ease;
}
.tx-dw-qwrap::before { left: 0; background: linear-gradient(90deg, #fff 28%, rgba(255, 255, 255, 0)); }
.tx-dw-qwrap::after { right: 0; background: linear-gradient(270deg, #fff 28%, rgba(255, 255, 255, 0)); }
.tx-dw-qwrap.tx-can-prev::before,
.tx-dw-qwrap.tx-can-next::after { opacity: 1; }

/* scroll arrows: only shown when there is somewhere to go */
.tx-dw-qnav {
  position: absolute; z-index: 2; top: 50%;
  transform: translateY(-50%); margin-top: 3px;
  width: 22px; height: 22px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: #fff; color: var(--ink-2);
  box-shadow: var(--sh-1);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .16s ease, visibility .16s ease, color .15s ease, border-color .15s ease;
}
.tx-dw-qnav .lu { width: 13px; height: 13px; }
.tx-dw-qnav.tx-prev { left: 3px; }
.tx-dw-qnav.tx-next { right: 3px; }
.tx-dw-qnav:hover { border-color: var(--p); color: var(--p); background: var(--p-light); }
.tx-dw-qwrap.tx-can-prev .tx-dw-qnav.tx-prev,
.tx-dw-qwrap.tx-can-next .tx-dw-qnav.tx-next {
  opacity: 1; visibility: visible; pointer-events: auto;
}
.tx-dw-qb {
  /* never shrink: squashed chips make the nowrap label spill out of the
     button and overlap the next chip instead of scrolling horizontally */
  flex: 0 0 auto;
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
  font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--line); color: var(--ink-2); background: #fff;
  transition: all .15s ease;
}
.tx-dw-qb:hover { border-color: var(--p); color: var(--p); background: var(--p-light); }

/* ---------------- composer ---------------- */
.tx-dw-comp { padding: 9px 11px 11px; border-top: 1px solid var(--line); flex: none; background: #fff; }
.tx-dw-box {
  display: flex; align-items: flex-end; gap: 6px;
  background: var(--bg); border: 1.5px solid transparent;
  border-radius: 16px; padding: 5px 6px 5px 12px;
  transition: border-color .16s ease, background .16s ease;
}
.tx-dw-box.tx-focus { background: #fff; border-color: var(--p); box-shadow: 0 0 0 3px var(--p-glow); }
.tx-dw-input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; resize: none;
  font-family: inherit; font-size: 13px; line-height: 1.45; color: var(--ink);
  max-height: 90px; padding: 6px 0;
}
.tx-dw-input::placeholder { color: var(--ink-3); }
.tx-dw-cb {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3); transition: all .15s ease;
}
.tx-dw-cb:hover { background: #fff; color: var(--p); }
.tx-dw-send {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--p) 0%, var(--p-dark) 100%);
  color: #fff; box-shadow: 0 3px 10px var(--p-glow);
  transition: transform .16s cubic-bezier(.34, 1.4, .64, 1), opacity .16s ease;
}
.tx-dw-send:hover { transform: scale(1.08); }
.tx-dw-send:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.tx-dw-send .lu { width: 16px; height: 16px; }

.tx-dw-emoji {
  position: absolute; left: 11px; right: 11px; bottom: 62px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--sh-2); padding: 9px;
  display: none; grid-template-columns: repeat(8, 1fr); gap: 2px;
  max-height: 168px; overflow-y: auto; z-index: 5;
}
.tx-dw-emoji.tx-open { display: grid; animation: txDkPop .18s ease both; }
.tx-dw-emoji button {
  height: 32px; border-radius: 8px; font-size: 18px; line-height: 1;
  transition: background .12s ease;
}
.tx-dw-emoji button:hover { background: var(--bg); }

/* ---------------- toast ---------------- */
.tx-dock-toasts {
  position: absolute; right: 0; bottom: 74px;
  display: flex; flex-direction: column-reverse; gap: 8px;
  pointer-events: none; z-index: 20;
}
.tx-dock-toast {
  display: flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff;
  padding: 10px 14px; border-radius: var(--r);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  box-shadow: var(--sh-2);
  animation: txDkToast .26s cubic-bezier(.34, 1.3, .64, 1) both;
}
.tx-dock-toast .lu { width: 15px; height: 15px; color: #7FB0FF; }
.tx-dock-toast.tx-out { animation: txDkToastOut .22s ease both; }

/* ---------------- ripple ---------------- */
.tx-dock-ripple {
  position: absolute; border-radius: 50%; transform: scale(0);
  background: rgba(255, 255, 255, .45); pointer-events: none;
  animation: txDkRipple .55s ease-out; z-index: 1;
}

/* ---------------- animations ---------------- */
@keyframes txDkIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes txDkSlide { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes txDkPop { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
@keyframes txDkType { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes txDkRing { 0% { transform: scale(.85); opacity: .65; } 70% { transform: scale(1.3); opacity: 0; } 100% { opacity: 0; } }
@keyframes txDkRipple { to { transform: scale(2.6); opacity: 0; } }
@keyframes txDkToast { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes txDkNudge { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-7px); } }
@keyframes txDkToastOut { to { opacity: 0; transform: translateX(18px); } }

@media (prefers-reduced-motion: reduce) {
  .tx-dock *, .tx-dw * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  /* not enough room for three: keep the two newest fully visible */
  .tx-dock-wins { right: 88px; gap: 10px; }
  .tx-dw { width: 310px; }
}
@media (max-width: 820px) {
  .tx-dock-panel { right: 14px; width: min(348px, calc(100vw - 28px)); }
  .tx-dock-bubbles { right: 14px; bottom: 14px; }
  .tx-dock-wins { right: 82px; }
  .tx-dw { width: min(320px, calc(100vw - 100px)); height: min(420px, calc(100vh - 110px)); }
  /* only the newest window stays on screen on small displays */
  .tx-dw:not(:last-of-type) { display: none; }
}
@media (max-width: 480px) {
  .tx-dock-panel { right: 12px; left: 12px; width: auto; max-height: min(66vh, calc(100vh - 100px)); }
  .tx-dock-bubbles { right: 12px; bottom: 12px; gap: 10px; }
  .tx-dock-bub { width: 48px; height: 48px; }
  .tx-dock-wins { right: 70px; left: 8px; justify-content: flex-end; }
  .tx-dw { width: 100%; height: min(70vh, calc(100vh - 100px)); }
}

/* hide the dock on the full Chat Hub page */
.tx-chathub-page .tx-dock { display: none !important; }

/* ---- keep chat windows inside the viewport on every screen size ---- */
.tx-dock-wins { max-width: calc(100vw - 16px); }
@media (max-width: 1100px) {
  .tx-dw { width: min(330px, calc(100vw - 104px)); }
}
@media (max-width: 820px) {
  .tx-dock-wins { left: 8px; right: 76px; justify-content: flex-end; max-width: none; }
  .tx-dw { width: 100%; max-width: calc(100vw - 92px); }
}
@media (max-width: 480px) {
  .tx-dock-wins { left: 6px; right: 6px; max-width: none; }
  .tx-dw {
    width: 100%;
    max-width: calc(100vw - 12px);
    height: min(455px, calc(100vh - 96px));
  }
}
