/* ─── LiveChat v2 — el chat de Textti de cara al cliente ──────────────────
 * Implementación FIEL del diseño "Textti Sitio Chat v2" (Claude Design).
 * Cargado vía <link> desde BaseLayoutV4 → /styles/livechat.css?v=2
 * Mobile-first: hoja completa en móvil, tarjeta anclada 400×640 en escritorio.
 * ─────────────────────────────────────────────────────────────────────── */

:root {
  --lc-accent: #0071E3;
  --lc-accent-ink: #005CBF;
  --lc-accent-soft: #EEF4FF;
  --lc-grad: linear-gradient(110deg, #04264E 0%, #0353AC 62%, #0071E3 100%);
  --lc-ink: #0E0E10;
  --lc-ink2: #4A4A52;
  --lc-ink3: #7A7A82;
  --lc-ink3m: #8C8C94;
  --lc-ink4: #B8B8BE;
  --lc-line: rgba(15, 15, 15, 0.08);
  --lc-line-s: rgba(15, 15, 15, 0.14);
  --lc-s1: #F5F5F7;
  --lc-s2: #FAFAFA;
  --lc-cream: #F7F4EE;
  --lc-cream-deep: #EFE9DE;
  --lc-live: #00A862;
  --lc-live-soft: #E6F7EF;
  --lc-warn: #B7791F;
  --lc-warn-soft: #FEF3DD;
  --lc-warn-ink: #7A5414;
  --lc-sale: #C53030;
  --lc-gold: #A57C2C;
  --lc-gold-soft: #F9F1DC;
  --lc-vendor: #1B7A43;
  --lc-vendor-soft: #EAF3EC;
  --lc-pro: #6D4AA6;
  --lc-pro-soft: #F3EEF9;
  --lc-sh-sm: 0 1px 2px rgba(15,15,15,0.05), 0 1px 3px rgba(15,15,15,0.05);
  --lc-sh-md: 0 6px 18px rgba(15,15,15,0.08), 0 2px 6px rgba(15,15,15,0.05);
  --lc-sh-lg: 0 24px 60px rgba(15,25,60,0.22), 0 8px 20px rgba(15,25,60,0.12);
}

/* ════════════════════════════════════════════════════════════════════
   BURBUJA + badge
   ════════════════════════════════════════════════════════════════════ */
.lc-bubble {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 55;
  width: 58px;
  height: 58px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: linear-gradient(155deg, #26262B 0%, #16161A 55%, #0B0B0D 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(15,15,15,0.3), 0 3px 8px rgba(15,15,15,0.18);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform 200ms cubic-bezier(0.32, 0.72, 0, 1),
              box-shadow 200ms cubic-bezier(0.32, 0.72, 0, 1);
}
.lc-bubble.is-on { display: inline-flex; }
.lc-bubble:hover { transform: scale(1.05); }
.lc-bubble:active { transform: scale(0.96); }
.lc-bubble__icon { display: inline-flex; }
.lc-bubble__badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--lc-sale);
  color: #fff;
  border: 2.5px solid #fff;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Móvil: la barra de navegación inferior del sitio es fija (56px sobre
   max(safe-area, 12px), oculta en ≥768px) → la burbuja vive ENCIMA de ella. */
@media (max-width: 767px) {
  .lc-bubble { bottom: calc(max(env(safe-area-inset-bottom, 0px), 12px) + 80px); }
  .lc-toast-stack, #lc-strip-slot { bottom: calc(max(env(safe-area-inset-bottom, 0px), 12px) + 150px); }
}

body[data-lc-hide="1"] .lc-bubble,
body[data-lc-hide="1"] .lc-toast-stack,
body[data-lc-hide="1"] #lc-strip-slot { display: none; }

/* ════════════════════════════════════════════════════════════════════
   TOASTS (mensaje nuevo, logueados)
   ════════════════════════════════════════════════════════════════════ */
.lc-toast-stack {
  position: fixed;
  right: 16px;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  z-index: 56;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(340px, calc(100vw - 32px));
}
.lc-toast {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  border: none;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--lc-sh-lg);
  cursor: pointer;
  text-align: left;
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 240ms ease, transform 240ms cubic-bezier(0.2, 0.8, 0.25, 1);
  position: relative;
}
.lc-toast.is-in { opacity: 1; transform: translateY(0) scale(1); }
.lc-toast.is-out { opacity: 0; transform: translateY(6px) scale(0.97); }
.lc-toast__avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--lc-accent-soft);
  color: var(--lc-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
}
.lc-toast__avatar img { width: 100%; height: 100%; object-fit: cover; }
.lc-toast__main { flex: 1; min-width: 0; }
.lc-toast__name {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--lc-ink);
}
.lc-toast__body {
  margin: 3px 0 0;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  color: var(--lc-ink2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lc-toast__close {
  position: absolute;
  top: 8px; right: 8px;
  border: none;
  background: transparent;
  color: var(--lc-ink4);
  cursor: pointer;
  padding: 3px;
  display: inline-flex;
}

/* ════════════════════════════════════════════════════════════════════
   TIRA PROACTIVA (empujón a anónimos) — discreta, descartable, no modal
   ════════════════════════════════════════════════════════════════════ */
#lc-strip-slot {
  position: fixed;
  right: 16px;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  z-index: 56;
  max-width: min(360px, calc(100vw - 32px));
}
.lc-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--lc-sh-md);
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 240ms ease, transform 240ms cubic-bezier(0.2, 0.8, 0.25, 1);
}
.lc-strip.is-in { opacity: 1; transform: translateY(0) scale(1); }
.lc-strip.is-out { opacity: 0; transform: translateY(6px) scale(0.97); }
.lc-strip__text {
  flex: 1;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.35;
  color: var(--lc-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lc-strip__cta {
  flex-shrink: 0;
  height: 32px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: var(--lc-accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.lc-strip__close {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--lc-ink4);
  cursor: pointer;
  padding: 3px;
  display: inline-flex;
}

/* ════════════════════════════════════════════════════════════════════
   AVATARES + etiquetas de contraparte (multi-parte)
   ════════════════════════════════════════════════════════════════════ */
.lc-team-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--lc-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.lc-team-avatar img { width: 62%; height: 62%; object-fit: contain; display: block; }
.lc-team-avatar--sm { width: 30px; height: 30px; }
.lc-team-avatar--lg { width: 46px; height: 46px; box-shadow: inset 0 0 0 1px var(--lc-line), 0 0 0 3px rgba(255,255,255,0.3); }
/* pila del saludo (logo + equipo) */
.lc-stack { display: flex; align-items: center; }
.lc-stack > * { box-shadow: 0 0 0 3px rgba(255,255,255,0.35); }
.lc-stack__u {
  width: 38px; height: 38px;
  border-radius: 50%;
  margin-left: -14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.lc-stack__u--brand { background: #2B8CF2; }
.lc-stack__u--gold { background: var(--lc-gold); }
.lc-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--lc-s1);
  color: var(--lc-ink2);
}
.lc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lc-avatar--vendor { background: var(--lc-vendor-soft); color: var(--lc-vendor); }
.lc-avatar--pro { background: var(--lc-pro-soft); color: var(--lc-pro); }
.lc-avatar--directo { background: var(--lc-s1); color: var(--lc-ink2); }

.lc-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.lc-tag--textti { background: var(--lc-accent-soft); color: var(--lc-accent); }
.lc-tag--vendor { background: var(--lc-vendor-soft); color: var(--lc-vendor); }
.lc-tag--pro { background: var(--lc-pro-soft); color: var(--lc-pro); }
.lc-tag--directo { background: var(--lc-s1); color: var(--lc-ink3); }
.lc-tag--onnavy { background: rgba(255,255,255,0.16); color: #fff; }

.lc-livedot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--lc-live);
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.35);
}
.lc-livedot--sm { width: 7px; height: 7px; }

/* ════════════════════════════════════════════════════════════════════
   PANEL — hoja móvil / tarjeta escritorio
   ════════════════════════════════════════════════════════════════════ */
.lc-panel { position: fixed; inset: 0; z-index: 70; }
.lc-panel[hidden] { display: none; }
.lc-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 14, 16, 0.4);
  opacity: 0;
  transition: opacity 220ms ease;
}
.lc-panel.is-open .lc-panel__backdrop { opacity: 1; }
.lc-panel__sheet {
  position: absolute;
  inset: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 220ms ease, transform 220ms cubic-bezier(0.32, 0.72, 0, 1);
}
.lc-panel.is-open .lc-panel__sheet { opacity: 1; transform: translateY(0); }
.lc-panel.is-busy .lc-panel__sheet { pointer-events: none; opacity: 0.7; }

@media (min-width: 641px) {
  .lc-panel__backdrop { background: transparent; }
  .lc-panel__sheet {
    inset: auto 24px calc(96px + env(safe-area-inset-bottom, 0px)) auto;
    width: 400px;
    height: min(640px, calc(100vh - 140px));
    border-radius: 22px;
    box-shadow: var(--lc-sh-lg);
  }
}

/* Vistas: solo la del modo actual */
.lc-view { display: none; flex-direction: column; flex: 1; min-height: 0; }
.lc-panel[data-mode="home"] .lc-view--home,
.lc-panel[data-mode="list"] .lc-view--list,
.lc-panel[data-mode="thread"] .lc-view--thread,
.lc-panel[data-mode="gate"] .lc-view--gate { display: flex; }

/* ── Encabezados ── */
.lc-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 12px;
  background: var(--lc-grad);
  color: #fff;
}
@media (min-width: 641px) {
  .lc-head { padding-top: 12px; }
}
.lc-head--solid { background: #fff; color: var(--lc-ink); border-bottom: 1px solid var(--lc-line); }
.lc-head__main { flex: 1; min-width: 0; }
.lc-head__name {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 7px;
}
.lc-head__sub {
  margin: 1px 0 0;
  font-family: var(--font-sans);
  font-size: 11.5px;
  opacity: 0.82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lc-head--solid .lc-head__sub { color: var(--lc-ink3); opacity: 1; }
.lc-icon-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.14);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.lc-icon-btn--ink { background: var(--lc-s1); color: var(--lc-ink2); }

/* ── HOME ── */
.lc-view--home { background: var(--lc-s1); }
.lc-hero {
  position: relative;
  flex-shrink: 0;
  background: var(--lc-grad);
  color: #fff;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 22px 24px;
}
@media (min-width: 641px) { .lc-hero { padding-top: 20px; } }
.lc-hero__weave {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image:
    repeating-linear-gradient(45deg, #fff 0 2px, transparent 2px 13px),
    repeating-linear-gradient(-45deg, #fff 0 2px, transparent 2px 13px);
  pointer-events: none;
}
.lc-hero__top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.lc-brand-logo {
  height: 22px;
  width: auto;
  display: block;
}
.lc-brand {
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.lc-hero__title {
  position: relative;
  margin: 14px 0 0;
  color: #fff; /* :where(h1-h6) global pisa la herencia */
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.6px;
  line-height: 1.1;
}
.lc-hero__reply {
  position: relative;
  margin: 11px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: rgba(255,255,255,0.86);
}
.lc-home__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom, 0px));
}
.lc-write {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  border: 1px solid var(--lc-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--lc-sh-sm);
  cursor: pointer;
  text-align: left;
}
.lc-write:active { transform: scale(0.99); }
.lc-write__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lc-write__main strong { font-family: var(--font-sans); font-size: 15.5px; font-weight: 700; color: var(--lc-ink); }
.lc-write__main small { font-family: var(--font-sans); font-size: 12.5px; color: var(--lc-ink3); }
.lc-write__go {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--lc-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lc-recent {
  width: 100%;
  margin-top: 11px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--lc-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--lc-sh-sm);
  cursor: pointer;
  text-align: left;
}
.lc-recent__stack { display: flex; align-items: center; }
.lc-recent__av { display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.lc-recent__av + .lc-recent__av { margin-left: -10px; }
.lc-recent__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lc-recent__main strong { font-family: var(--font-sans); font-size: 14px; font-weight: 700; color: var(--lc-ink); }
.lc-recent__main small { font-family: var(--font-sans); font-size: 12px; color: var(--lc-ink3); }
.lc-recent__badge {
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #1C1C21;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lc-recent__chev { color: var(--lc-ink4); flex-shrink: 0; }
.lc-sect-label {
  margin: 20px 2px 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--lc-ink3m);
}
.lc-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lc-tile {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 106px;
  padding: 13px 14px;
  border: 1px solid var(--lc-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--lc-sh-sm);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}
.lc-tile:active { transform: scale(0.99); }
.lc-tile strong { font-family: var(--font-sans); font-size: 14px; font-weight: 700; color: var(--lc-ink); line-height: 1.15; }
.lc-tile small { font-family: var(--font-sans); font-size: 11.5px; color: var(--lc-ink3); line-height: 1.35; margin-top: -5px; }
.lc-tile__ic {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lc-tile__ic--navy { background: var(--lc-accent-soft); color: var(--lc-accent); }
.lc-tile__ic--gold { background: var(--lc-gold-soft); color: var(--lc-gold); }
.lc-tile__ic--green { background: var(--lc-vendor-soft); color: var(--lc-vendor); }
.lc-tile__ic--purple { background: var(--lc-pro-soft); color: var(--lc-pro); }
.lc-trust {
  margin: 16px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3px;
  color: var(--lc-ink3m);
}

/* ── LISTA (bandeja multi-parte) ── */
.lc-view--list { background: var(--lc-s1); }
.lc-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; }
.lc-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border: none;
  border-bottom: 1px solid var(--lc-line);
  background: #fff;
  cursor: pointer;
  text-align: left;
  position: relative;
}
.lc-item:first-child { border-top-left-radius: 14px; border-top-right-radius: 14px; }
.lc-item:last-child { border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; border-bottom: none; }
.lc-item:hover { background: var(--lc-s2); }
.lc-item__main { flex: 1; min-width: 0; }
.lc-item__top { display: flex; align-items: center; gap: 7px; }
.lc-item__name {
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--lc-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-item__time {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--lc-ink3m);
  flex-shrink: 0;
}
.lc-item__ctx {
  display: inline-block;
  max-width: 100%;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--lc-s1);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2px;
  color: var(--lc-ink2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-item__preview {
  margin: 4px 0 0;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--lc-ink3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-item.is-unread .lc-item__preview { color: var(--lc-ink); font-weight: 600; }
.lc-item__dot {
  position: absolute;
  right: 14px;
  bottom: 16px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--lc-accent);
}
.lc-item--locked { opacity: 0.75; }
.lc-item__avatar--lock {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--lc-s1);
  color: var(--lc-ink3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* esqueleto de carga */
.lc-skel-list { background: #fff; border-radius: 14px; padding: 6px 14px; }
.lc-skel-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; }
.lc-skel {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--lc-s1) 25%, #ECECEF 50%, var(--lc-s1) 75%);
  background-size: 200% 100%;
  animation: lcShimmer 1.3s infinite;
}
.lc-skel--av { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }
.lc-skel--l1 { height: 14px; flex: 1; max-width: 75%; }
.lc-skel--l2 { height: 14px; flex: 1; max-width: 55%; }
@keyframes lcShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.lc-empty {
  padding: 46px 24px;
  text-align: center;
  color: var(--lc-ink3);
  font-family: var(--font-sans);
}
.lc-empty__icon {
  display: inline-flex;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fff;
  color: var(--lc-ink4);
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: var(--lc-sh-sm);
}
.lc-empty strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--lc-ink);
  letter-spacing: -0.2px;
}
.lc-empty p { margin: 7px 0 0; font-size: 13.5px; line-height: 1.5; }

/* ── HILO ── */
.lc-view--thread { background: var(--lc-s1); }
.lc-chip-slot { flex-shrink: 0; }
.lc-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  background: #fff;
  border-bottom: 1px solid var(--lc-line);
}
.lc-chip__ic {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--lc-accent-soft);
  color: var(--lc-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lc-chip__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--lc-ink3m);
  flex-shrink: 0;
}
.lc-chip__title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--lc-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-stream {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lc-day {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--lc-ink3m);
  padding: 4px 0;
}
.lc-msg { display: flex; align-items: flex-end; gap: 8px; }
.lc-msg--mine { flex-direction: row-reverse; }
.lc-msg__avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--lc-accent-soft);
  color: var(--lc-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
}
.lc-msg__avatar img { width: 100%; height: 100%; object-fit: cover; }
.lc-msg__bubble {
  max-width: 80%;
  padding: 10px 13px;
  border-radius: 16px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.5;
  background: #fff;
  color: var(--lc-ink);
  border: 1px solid var(--lc-line);
  border-bottom-left-radius: 5px;
}
.lc-msg--mine .lc-msg__bubble {
  background: #1C1C21;
  color: #fff;
  border: none;
  border-radius: 16px;
  border-bottom-right-radius: 5px;
}
.lc-msg__bubble--card {
  background: transparent;
  border: none;
  padding: 0;
  max-width: 92%;
  width: 100%;
}
.lc-msg__body { margin: 0; overflow-wrap: break-word; white-space: pre-wrap; }
.lc-msg__time {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  opacity: 0.55;
}
.lc-system { display: flex; justify-content: center; margin: 4px 0; }
.lc-system span {
  display: inline-flex;
  max-width: 88%;
  padding: 6px 13px;
  border-radius: 999px;
  background: #EDEEF2;
  color: var(--lc-ink3);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}
.lc-stream-empty {
  margin: auto;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--lc-ink3);
  padding: 24px 12px;
}
.lc-stream-empty strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--lc-ink);
  margin-bottom: 4px;
}
.lc-warn-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--lc-warn-soft);
  border: 1px solid rgba(183, 121, 31, 0.19);
  color: var(--lc-warn-ink);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.45;
}
.lc-warn-banner svg { flex-shrink: 0; margin-top: 2px; color: var(--lc-warn); }

/* composer */
.lc-composer {
  flex-shrink: 0;
  border-top: 1px solid var(--lc-line);
  background: #fff;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 641px) { .lc-composer { padding-bottom: 12px; } }
.lc-composer__warn {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--lc-warn-ink);
}
/* ═══ COMPOSER RICO (F2 — lc-composer.jsx): rectángulo de esquinas suaves,
   herramientas DENTRO del campo, NUNCA pill. ═══ */
.lc-cx {
  border: 1.5px solid var(--lc-line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.18s;
}
.lc-cx:focus-within { border-color: var(--lc-accent); }
.lc-composer textarea {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  resize: none;
  font-family: var(--font-sans);
  font-size: 16px; /* 16px: iOS no hace zoom */
  line-height: 1.4;
  color: var(--lc-ink);
  padding: 11px 13px 4px;
  min-height: 21px;
  outline: none;
}
.lc-composer textarea::placeholder { color: var(--lc-ink3m); }
.lc-composer textarea[hidden], .lc-cx__set[hidden], .lc-cx__stop[hidden], .lc-send[hidden],
.lc-cx__rec[hidden], .lc-cx__recdone[hidden], .lc-cx-atts[hidden], .lc-picker[hidden],
.lc-cbtn[hidden] { display: none; }
.lc-cx__tools {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px 8px;
}
.lc-cx__set { display: inline-flex; align-items: center; gap: 2px; }
.lc-cx__sp { flex: 1; }
.lc-cbtn {
  height: 30px;
  min-width: 30px;
  padding: 0;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--lc-ink3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s ease-out, color 0.14s ease-out;
}
.lc-cbtn:hover { color: var(--lc-ink2); background: var(--lc-s1); }
.lc-cbtn.is-active { background: var(--lc-accent-soft); color: var(--lc-accent); }
.lc-cbtn--gif {
  padding: 0 7px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.lc-send {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: none;
  background: var(--lc-s1);
  color: var(--lc-ink4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s, color 0.18s;
}
.lc-send.is-ready { background: var(--lc-accent); color: #fff; }
.lc-send:disabled { background: var(--lc-ink4); color: #fff; cursor: default; }
/* grabando / grabación lista */
.lc-cx__rec, .lc-cx__recdone { display: flex; align-items: center; gap: 11px; padding: 11px 13px 2px; }
.lc-cx__recdone { padding: 9px 13px 2px; }
.lc-cx__recdot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--lc-sale); flex-shrink: 0;
  animation: lcBlink 1s ease-in-out infinite;
}
.lc-cx__rectime {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12.5px;
  color: var(--lc-ink2);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.lc-cx__cancel {
  height: 30px; padding: 0 11px;
  border-radius: 8px; border: none; background: transparent;
  color: var(--lc-ink3);
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
  cursor: pointer;
}
.lc-cx__stop {
  width: 34px; height: 34px;
  border-radius: 10px; border: none;
  background: var(--lc-sale); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
@keyframes lcBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
/* onda (nota de voz) */
.lc-wave { display: flex; align-items: center; gap: 2.5px; flex: 1; height: 26px; overflow: hidden; }
.lc-wave i { width: 3px; border-radius: 2px; background: var(--lc-accent); flex-shrink: 0; }
.lc-wave--live i { background: var(--lc-sale); animation: lcWaveBar 1s ease-in-out infinite; }
.lc-wave--live i:nth-child(3n) { animation-delay: 0.18s; }
.lc-wave--live i:nth-child(3n + 1) { animation-delay: 0.36s; }
@keyframes lcWaveBar { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.45); } }
.lc-vplay {
  width: 32px; height: 32px;
  border-radius: 9px; border: none;
  background: var(--lc-accent-soft); color: var(--lc-accent);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
/* adjuntos en cola (preview) */
.lc-cx-atts { display: flex; flex-direction: column; gap: 7px; margin-bottom: 9px; }
.lc-cx-att {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--lc-line);
  background: var(--lc-s2);
}
.lc-cx-att.is-up { opacity: 0.6; }
.lc-cx-att img, .lc-cx-att__ph {
  width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--lc-line);
}
.lc-cx-att__ph { background: repeating-linear-gradient(135deg, var(--lc-cream-deep), var(--lc-cream-deep) 6px, var(--lc-cream) 6px, var(--lc-cream) 12px); }
.lc-cx-att__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lc-cx-att__main strong {
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; color: var(--lc-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lc-cx-att__main small { font-family: var(--font-mono, ui-monospace, monospace); font-size: 10px; color: var(--lc-ink3m); }
.lc-cx-att button {
  width: 26px; height: 26px; border-radius: 8px; border: none;
  background: #fff; color: var(--lc-ink2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--lc-sh-sm); flex-shrink: 0;
}
/* pickers sobre el composer (PickerShell) */
.lc-picker { border: 1px solid var(--lc-line); border-radius: 12px; background: #fff; margin-bottom: 9px; box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.18); }
.lc-picker__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 0; }
.lc-picker__head span {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--lc-ink3m);
}
.lc-picker__head button { border: none; background: transparent; cursor: pointer; padding: 2px; color: var(--lc-ink4); display: inline-flex; }
.lc-picker__body { padding: 8px 12px 12px; max-height: 168px; overflow-y: auto; }
.lc-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.lc-emoji-grid button {
  border: none; background: transparent; font-size: 21px; line-height: 34px;
  cursor: pointer; border-radius: 8px; padding: 0;
}
.lc-emoji-grid button:hover { background: var(--lc-s1); }
.lc-gif-search {
  display: flex; align-items: center; gap: 8px;
  height: 36px; border-radius: 10px;
  background: var(--lc-s1); border: 1px solid var(--lc-line);
  padding: 0 11px; margin-bottom: 9px;
  color: var(--lc-ink3);
}
.lc-gif-search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-family: var(--font-sans); font-size: 13px; color: var(--lc-ink);
}
.lc-gif-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.lc-gif { aspect-ratio: 4 / 3; border-radius: 9px; border: 1px solid var(--lc-line); background: var(--lc-s1); overflow: hidden; cursor: pointer; padding: 0; }
.lc-gif img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-gif.is-sending { opacity: 0.5; }
.lc-gif-note { grid-column: 1 / -1; margin: 0; padding: 10px 2px; font-family: var(--font-sans); font-size: 12px; color: var(--lc-ink3); }
/* nota de voz en el hilo */
.lc-voice {
  display: flex; align-items: center; gap: 10px;
  width: 210px; max-width: 100%;
  padding: 9px 12px;
  border-radius: 14px;
  border: 1px solid var(--lc-line);
  background: #fff;
  cursor: pointer;
}
.lc-voice .lc-voice__t {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px; color: var(--lc-ink3);
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.lc-voice .lc-vplay { width: 28px; height: 28px; border-radius: 8px; }
.lc-voice--mine { background: var(--lc-accent); border: none; border-bottom-right-radius: 5px; }
.lc-voice--mine .lc-wave i { background: rgba(255, 255, 255, 0.75); }
.lc-voice--mine .lc-voice__t { color: rgba(255, 255, 255, 0.8); }
.lc-voice--mine .lc-vplay { background: rgba(255, 255, 255, 0.18); color: #fff; }
.lc-vplay__pause, .is-playing .lc-vplay__play { display: none; }
.is-playing .lc-vplay__pause { display: block; }
.lc-voice.is-playing .lc-wave i { animation: lcWaveBar 1s ease-in-out infinite; }
.lc-voice.is-playing .lc-wave i:nth-child(3n) { animation-delay: 0.18s; }
.lc-voice.is-playing .lc-wave i:nth-child(3n + 1) { animation-delay: 0.36s; }
/* CSAT (¿cómo te atendimos hoy?) */
.lc-csat { padding: 15px 15px 14px; text-align: center; min-width: 232px; }
.lc-csat__title { font-family: var(--font-sans); font-size: 14px; font-weight: 700; color: var(--lc-ink); }
.lc-csat__sub { font-family: var(--font-sans); font-size: 12px; color: var(--lc-ink3); margin-top: 2px; }
.lc-csat__faces { display: flex; justify-content: center; gap: 8px; margin-top: 13px; }
.lc-csat__face {
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--lc-line);
  background: #fff; color: var(--lc-ink3);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s, color 0.15s;
  padding: 0;
}
.lc-csat__face.is-on { border-color: var(--lc-accent); background: var(--lc-accent-soft); color: var(--lc-accent); transform: scale(1.06); }
.lc-csat__face.is-dim { opacity: 0.35; cursor: default; }
span.lc-csat__face { cursor: default; }
.lc-csat__more { margin-top: 12px; text-align: left; }
.lc-csat__comment {
  width: 100%;
  border: 1px solid var(--lc-line);
  border-radius: 11px;
  padding: 10px 12px;
  font-family: var(--font-sans); font-size: 13px; color: var(--lc-ink);
  resize: none; outline: none; background: #fff;
}
.lc-csat__comment::placeholder { color: var(--lc-ink3m); }
.lc-csat__comment:focus { border-color: var(--lc-accent); }
.lc-csat__send {
  margin-top: 9px; width: 100%; height: 42px;
  border-radius: 11px; border: none;
  background: var(--lc-accent); color: #fff;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 700;
  cursor: pointer;
}
.lc-csat__send:disabled { opacity: 0.6; cursor: default; }
/* conversación cerrada (nota de sistema con check) */
.lc-closednote { display: flex; justify-content: center; margin: 4px 0; }
.lc-closednote span {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 9px;
  background: #edeef2; color: var(--lc-ink3);
  font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  text-align: center;
}
.lc-closednote svg { flex-shrink: 0; }
/* micro-celebración (pago realizado) — pop + anillo, sin confeti */
.lc-celebrate { display: flex; justify-content: center; margin: 6px 0; }
.lc-celebrate__box {
  text-align: center; padding: 16px 22px 14px;
  border-radius: 16px; background: #fff;
  border: 1px solid var(--lc-line); box-shadow: var(--lc-sh-md);
}
.lc-celebrate__ic { position: relative; width: 52px; height: 52px; margin: 0 auto; display: block; }
.lc-celebrate__ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--lc-live);
  animation: lcRing 1.6s cubic-bezier(0.2, 0.8, 0.3, 1) 2;
}
.lc-celebrate__chk {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--lc-live-soft); color: var(--lc-live);
  display: flex; align-items: center; justify-content: center;
  animation: lcPopIn 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.lc-celebrate__box strong {
  display: block;
  font-family: var(--font-serif); font-size: 18px; font-weight: 500;
  letter-spacing: -0.3px; color: var(--lc-ink); margin-top: 10px;
}
.lc-celebrate__box small { display: block; font-family: var(--font-sans); font-size: 12.5px; color: var(--lc-ink3); margin-top: 3px; }
@keyframes lcRing { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes lcPopIn { 0% { transform: scale(0); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
/* cabecera de conversación: avatar con punto de presencia */
.lc-head__avwrap { position: relative; flex-shrink: 0; display: inline-flex; }
.lc-head__dot {
  position: absolute; right: -1px; bottom: -1px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #b9c0d4; border: 2px solid #1b357e;
}
.lc-head__dot.is-on { background: var(--lc-live); }
/* nombre de quien escribe dentro de la burbuja (gate/nudge) */
.lc-msg__who {
  display: block;
  font-family: var(--font-sans); font-size: 11.5px; font-weight: 700;
  color: var(--lc-ink); margin-bottom: 2px;
}

/* ── GATE — GateInline (lc-conv.jsx): el mensaje del equipo como burbuja EN el
   hilo; el llamado a crear cuenta ocupa el lugar del composer. ── */
.lc-view--gate { background: var(--lc-s1); }
.lc-gate__stream {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 14px 6px;
}
.lc-gate__body {
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid var(--lc-line);
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  max-height: 72%;
  overflow-y: auto;
}
.lc-gate__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--lc-ink);
}
.lc-gate__sub {
  margin: 4px 0 12px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--lc-ink3);
}
.lc-view--gate .lc-trust { margin-top: 12px; }

/* ══ FASE C · compartir tela desde el chat (lado cliente) ══
   (el botón ahora es un .lc-cbtn dentro del campo — F2) */
.lc-telapick { margin: 0 0 8px; border: 1px solid var(--lc-line, #e4e4e7); border-radius: 12px; background: var(--lc-surface, #fff); box-shadow: 0 -8px 24px -12px rgba(0,0,0,.18); overflow: hidden; }
.lc-telapick__head { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 10px; border-bottom: 1px solid var(--lc-line, #e4e4e7); }
.lc-telapick__head input { flex: 1; border: none; outline: none; background: transparent; font-size: 13.5px; color: var(--lc-ink, #18181b); }
.lc-telapick__results { max-height: 240px; overflow-y: auto; }
.lc-telapick__empty { margin: 0; padding: 14px 12px; font-size: 12px; color: var(--lc-ink-3, #a1a1aa); }
.lc-telapick__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: none; border-bottom: 1px solid var(--lc-line, #f0f0f1); background: transparent; cursor: pointer; text-align: left; }
.lc-telapick__item:hover { background: var(--lc-surface-2, #f6f6f7); }
.lc-telapick__item:last-child { border-bottom: none; }
.lc-telapick__item img, .lc-telapick__ph { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--lc-surface-2, #f0f0f1); flex-shrink: 0; }
.lc-telapick__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lc-telapick__info strong { font-size: 13px; font-weight: 600; color: var(--lc-ink, #18181b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-telapick__info small { font-size: 11.5px; color: var(--lc-ink-3, #71717a); }

/* ═══ v7 (2026-07-16): adjuntos, resumen "Para ti", expandir, barra inferior ═══ */

/* ── Adjuntos genéricos (imagen / documento) en burbujas ── */
.lc-att-img { display: block; margin: 2px 0 4px; border-radius: 10px; overflow: hidden; max-width: 240px; }
.lc-att-img img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: cover; }
.lc-att-doc {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 2px 0 4px; padding: 8px 12px;
  border: 1px solid rgb(0 0 0 / 0.10); border-radius: 10px;
  background: rgb(255 255 255 / 0.75);
  font-size: 12.5px; font-weight: 600; color: inherit; text-decoration: none;
  max-width: 100%;
}
.lc-att-doc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-att-doc:hover { background: rgb(255 255 255 / 0.95); }
.lc-att-doc svg { flex-shrink: 0; opacity: 0.7; }

/* ── "Para ti": resumen COMPACTO del inicio ── */
.lc-pt { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.lc-pt-row {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 11px 12px; text-align: left; text-decoration: none; cursor: pointer;
  background: var(--lc-surface, #fff);
  border: 1px solid var(--lc-line, #e4e4e7); border-radius: 14px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.04); font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.lc-pt-row:hover { border-color: var(--lc-ink-4, #a1a1aa); box-shadow: 0 3px 10px rgb(0 0 0 / 0.07); transform: translateY(-1px); }
.lc-pt-ic {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.lc-pt-ic.is-live { background: var(--lc-accent-soft, #eef4ff); color: var(--lc-accent, #0071e3); }
.lc-pt-ic.is-prep { background: var(--lc-surface-2, #f4f4f5); color: var(--lc-ink-2, #3f3f46); }
.lc-pt-ic.is-ok   { background: #e5f5ec; color: #00814c; }
.lc-pt-ic.is-warn { background: #fdf3e0; color: #a16207; }
.lc-pt-ic.is-gold { background: #f7f0df; color: #8a6d1d; }
.lc-pt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lc-pt-main strong {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  font-size: 13px; font-weight: 650; color: var(--lc-ink, #09090b); letter-spacing: -0.1px;
}
.lc-pt-main small { font-size: 11.5px; color: var(--lc-ink-3, #71717a); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-pt-estado {
  font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.lc-pt-estado.is-live { background: var(--lc-accent-soft, #eef4ff); color: var(--lc-accent, #0071e3); }
.lc-pt-estado.is-prep { background: var(--lc-surface-2, #f4f4f5); color: var(--lc-ink-2, #3f3f46); }
.lc-pt-estado.is-ok   { background: #e5f5ec; color: #00814c; }
.lc-pt-estado.is-warn { background: #fdf3e0; color: #a16207; }
.lc-pt-chev { flex-shrink: 0; color: var(--lc-ink-4, #a1a1aa); }
.lc-pt-cta {
  flex-shrink: 0; padding: 7px 14px; border-radius: 999px;
  background: var(--lc-ink, #09090b); color: #fff;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.lc-pt-row:hover .lc-pt-cta { opacity: 0.9; }

/* ── Expandir/contraer (paridad Crisp) — solo escritorio ── */
.lc-expand { display: none; }
.lc-expand .lc-expand__min { display: none; }
@media (min-width: 900px) {
  .lc-expand { display: inline-flex; }
  .lc-panel__sheet { transition: transform 220ms cubic-bezier(0.32, 0.72, 0, 1), width 260ms cubic-bezier(0.32, 0.72, 0, 1); }
  .lc-panel.is-expanded .lc-panel__sheet { width: min(760px, 92vw); }
  .lc-panel.is-expanded .lc-expand .lc-expand__max { display: none; }
  .lc-panel.is-expanded .lc-expand .lc-expand__min { display: inline; }
  .lc-panel.is-expanded .lc-msg__bubble { max-width: 520px; }
}

/* ── Barra inferior de navegación (Inicio / Mensajes) ── */
.lc-bar {
  display: none; flex-shrink: 0;
  border-top: 1px solid var(--lc-line, #e4e4e7);
  background: var(--lc-surface, #fff);
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
}
.lc-panel[data-mode="home"] .lc-bar,
.lc-panel[data-mode="list"] .lc-bar { display: flex; }
.lc-bar__tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; border: none; background: transparent; cursor: pointer;
  color: var(--lc-ink-3, #71717a); font-size: 10.5px; font-weight: 600;
  border-radius: 10px; transition: color 0.15s ease, background 0.15s ease;
  position: relative;
}
.lc-bar__tab:hover { color: var(--lc-ink, #09090b); background: var(--lc-surface-2, #f4f4f5); }
.lc-panel[data-mode="home"] .lc-bar__tab--home,
.lc-panel[data-mode="list"] .lc-bar__tab--list { color: var(--lc-accent, #0071e3); }
.lc-bar__badge {
  position: absolute; top: 2px; right: calc(50% - 18px);
  min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px;
  background: var(--lc-danger, #ef4444); color: #fff;
  font-size: 9px; font-weight: 700; line-height: 15px; text-align: center;
}

/* ── v7.1: expansión CORRECTA (alto + ancho, estilo Intercom) + posición del botón ── */
@media (min-width: 900px) {
  .lc-panel.is-expanded .lc-panel__sheet {
    inset: 20px 20px 20px auto;   /* casi toda la altura, anclada a la derecha */
    width: min(720px, calc(100vw - 40px));
    height: auto;                 /* la definen top+bottom del inset */
  }
  .lc-panel.is-expanded .lc-home__body,
  .lc-panel.is-expanded .lc-list { padding-left: 22px; padding-right: 22px; }
}
/* El botón expandir SIEMPRE pegado al grupo derecho (el space-between del héroe lo dejaba flotando en el centro). */
.lc-hero__top { gap: 8px; }
.lc-hero__top .lc-expand { margin-left: auto; }

/* ═══ v8 (2026-07-16): Livechat v2 · FASE 1 — diseño "Textti Livechat v2" ═══
   Lanzador navy con ícono que cambia · eye-catcher de mano (orgánico) ·
   aviso proactivo en tarjeta (adiós píldora) · Inicio v2 compacto ·
   animaciones con tokens de movimiento (micro 140 / entrada 260 / vista 320 /
   física 420-500) · prefers-reduced-motion respetado. */

/* ── Lanzador: degradado navy de marca + morph chat ↔ cerrar ── */
.lc-bubble {
  background: var(--lc-grad);
  box-shadow: 0 10px 28px rgba(15,25,60,0.34), 0 3px 8px rgba(15,25,60,0.2);
}
.lc-bubble__icon { position: relative; width: 24px; height: 24px; }
.lc-bubble__icon svg {
  position: absolute; inset: 0; margin: auto;
  transition: opacity 200ms ease, transform 320ms cubic-bezier(0.3, 1.15, 0.35, 1);
}
.lc-bubble__ic-open { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.lc-bubble.is-open .lc-bubble__ic-chat { opacity: 0; transform: rotate(90deg) scale(0.5); }
.lc-bubble.is-open .lc-bubble__ic-open { opacity: 1; transform: rotate(0deg) scale(1); }
.lc-bubble__badge { animation: lcBadgePop 500ms cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes lcBadgePop { 0% { transform: scale(0); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* ── Eye-catcher: la mano saluda sobre la burbuja (ráfagas, nunca bucle infinito) ── */
#lc-eye-slot {
  position: fixed;
  right: 16px;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  z-index: 56;
  max-width: min(320px, calc(100vw - 32px));
}
@media (max-width: 767px) {
  #lc-eye-slot { bottom: calc(max(env(safe-area-inset-bottom, 0px), 12px) + 150px); }
}
body[data-lc-hide="1"] #lc-eye-slot { display: none; }
.lc-eye {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 30px 10px 10px;
  border: none;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--lc-sh-md);
  cursor: pointer;
  text-align: left;
  opacity: 0;
}
.lc-eye.is-in { animation: lcNudgeIn 500ms cubic-bezier(0.2, 0.9, 0.25, 1.15) forwards; }
.lc-eye.is-out { transition: opacity 240ms ease, transform 240ms ease; opacity: 0; transform: translateY(8px) scale(0.97); }
.lc-eye__hand {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--lc-cream);
  color: var(--lc-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lc-eye__hand svg { transform-origin: 50% 85%; animation: lcWave 8s ease-in-out 600ms 3; }
/* Eye-catcher definitivo: GIF de la mano que saluda (estilo LiveChat) — el GIF
   anima solo, sin ráfagas CSS. */
.lc-eye__hand img { width: 30px; height: 30px; display: block; object-fit: contain; }
.lc-eye__main { min-width: 0; }
.lc-eye__main strong { display: block; font-family: var(--font-sans); font-size: 13px; font-weight: 700; color: var(--lc-ink); line-height: 1.2; }
.lc-eye__main small { display: block; font-family: var(--font-sans); font-size: 11.5px; color: var(--lc-ink3); margin-top: 2px; }
.lc-eye__close {
  position: absolute; top: 7px; right: 7px;
  border: none; background: transparent;
  color: var(--lc-ink4); cursor: pointer;
  padding: 3px; display: inline-flex;
}
/* la ráfaga vive DENTRO del ciclo de 8 s: saluda 2,4 s y descansa (máx 3 ciclos) */
@keyframes lcWave {
  0% { transform: rotate(0deg); }
  4% { transform: rotate(14deg); }
  9% { transform: rotate(-12deg); }
  14% { transform: rotate(12deg); }
  19% { transform: rotate(-9deg); }
  24% { transform: rotate(10deg); }
  30%, 100% { transform: rotate(0deg); }
}
@keyframes lcNudgeIn {
  from { opacity: 0; transform: translateY(14px) scale(0.95); }
  70% { opacity: 1; transform: translateY(-2px) scale(1.01); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Aviso proactivo: TARJETA (el diseño v2 mata la píldora) ── */
.lc-strip {
  position: relative;
  align-items: flex-start;
  padding: 13px 14px;
  border-radius: 16px;
  box-shadow: var(--lc-sh-lg);
}
.lc-strip.is-in { animation: lcNudgeIn 500ms cubic-bezier(0.2, 0.9, 0.25, 1.15) forwards; opacity: 1; }
.lc-strip__main { flex: 1; min-width: 0; }
.lc-strip__head {
  display: flex; align-items: center; gap: 6px;
  padding-right: 18px;
}
.lc-strip__head strong { font-family: var(--font-sans); font-size: 13px; font-weight: 700; color: var(--lc-ink); }
.lc-strip__head time { margin-left: auto; font-family: var(--font-mono); font-size: 9.5px; color: var(--lc-ink3m); }
.lc-strip__main .lc-strip__text {
  display: -webkit-box;
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--lc-ink2);
  -webkit-line-clamp: 3;
}
.lc-strip__main .lc-strip__cta {
  margin-top: 10px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
}
.lc-strip__close { position: absolute; top: 9px; right: 9px; }

/* ── Inicio v2: héroe COMPACTO (el contenido manda) ── */
.lc-hero { padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 18px; }
@media (min-width: 641px) { .lc-hero { padding-top: 14px; } }
.lc-hero__top { margin-bottom: 0; }
.lc-brand-logo { height: 20px; }
.lc-hero__row {
  position: relative;
  margin-top: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.lc-hero__title { margin: 0; font-size: 25px; }
.lc-hero__reply { margin: 7px 0 0; font-size: 12.5px; }
.lc-hero__row .lc-stack { flex-shrink: 0; margin-bottom: 2px; }
.lc-hero__row .lc-team-avatar--lg { width: 38px; height: 38px; }
.lc-hero__row .lc-stack__u { width: 32px; height: 32px; margin-left: -12px; }

/* buscador de ayuda del inicio */
.lc-hsearch {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 46px;
  margin: 0 0 12px;
  padding: 0 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--lc-line);
  box-shadow: var(--lc-sh-sm);
}
.lc-hsearch:focus-within { border-color: var(--lc-line-s); }
.lc-hsearch svg { color: var(--lc-ink3); flex-shrink: 0; }
.lc-hsearch input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 16px; /* 16px: iOS no hace zoom */
  color: var(--lc-ink);
}
.lc-hsearch input::placeholder { color: var(--lc-ink3m); font-size: 14px; }

/* "Descubre en Textti" — lista estratégica (reemplaza la cuadrícula de mosaicos) */
.lc-grow {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--lc-line);
  box-shadow: var(--lc-sh-sm);
  overflow: hidden;
}
.lc-grow__row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid var(--lc-line);
  background: transparent;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}
.lc-grow__row:first-child { border-top: none; }
.lc-grow__row:hover { background: var(--lc-s2); }
.lc-grow__ic {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--lc-cream);
  color: var(--lc-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lc-grow__main { flex: 1; min-width: 0; }
.lc-grow__main strong { display: block; font-family: var(--font-sans); font-size: 13.5px; font-weight: 700; color: var(--lc-ink); }
.lc-grow__main small { display: block; font-family: var(--font-sans); font-size: 11.5px; color: var(--lc-ink3); margin-top: 1px; line-height: 1.35; }
.lc-grow__chev { color: var(--lc-ink4); flex-shrink: 0; }

/* ── Animaciones de vistas y mensajes (tokens del diseño) ── */
@keyframes lcViewIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.lc-view.is-enter { animation: lcViewIn 320ms cubic-bezier(0.2, 0.8, 0.25, 1); }
@keyframes lcMsgIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
.lc-msg, .lc-system, .lc-closednote, .lc-celebrate { animation: lcMsgIn 260ms cubic-bezier(0.2, 0.8, 0.25, 1) both; animation-delay: calc(var(--lc-i, 0) * 45ms); }
.lc-bar__tab svg { transition: transform 200ms cubic-bezier(0.3, 1.15, 0.35, 1); }
.lc-panel[data-mode="home"] .lc-bar__tab--home svg,
.lc-panel[data-mode="list"] .lc-bar__tab--list svg { transform: translateY(-2px); }
/* expandir/contraer con física (alto + ancho juntos, rebote sutil) */
@media (min-width: 900px) {
  .lc-panel__sheet {
    transition: transform 220ms cubic-bezier(0.32, 0.72, 0, 1),
                width 420ms cubic-bezier(0.3, 1.15, 0.35, 1),
                inset 420ms cubic-bezier(0.3, 1.15, 0.35, 1);
  }
}

/* accesibilidad: sin animaciones para quien las desactiva */
@media (prefers-reduced-motion: reduce) {
  .lc-view.is-enter, .lc-msg, .lc-system, .lc-closednote, .lc-celebrate,
  .lc-eye.is-in, .lc-strip.is-in, .lc-eye__hand svg, .lc-wave i,
  .lc-cx__recdot, .lc-celebrate__ring, .lc-celebrate__chk,
  .lc-bubble__icon svg, .lc-bubble__badge { animation: none !important; transition: none !important; }
}
