/* Livechat v2 — CSS v18. = v17 + Inicio "Panel vivo" (Opción 3, Diego 2026-07-18):
 * héroe adaptativo del inicio — deck del pedido en vivo (línea de tiempo + pulso de
 * actividad) + accesos rápidos, y el asistente "¿Qué vas a coser?" cuando no hay pedido.
 * El navy sigue solo en el encabezado; todo esto es claro. La barra inferior NO cambia. */
@import url('/styles/livechat-v17.css');

#lc-home-hero:empty { display: none; }

/* ── Deck deslizable del pedido ── */
.lc-deck { display: flex; gap: 11px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -2px; padding: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.lc-deck::-webkit-scrollbar { display: none; }
.lc-deck__card {
  /* La barra segmentada reusada (.ptcard__track) usa --qc-*; aquí NO hay .qcard que los
     defina, así que los mapeamos a los tokens del widget para que pinte con color. */
  --qc-surface: var(--lc-surface, #fff); --qc-ink: var(--lc-ink, #09090b);
  --qc-ink3: var(--lc-ink-3, #71717a); --qc-accent: var(--lc-accent, #0071e3);
  scroll-snap-align: start; flex: 0 0 auto; width: 86%; min-width: 86%; box-sizing: border-box;
  text-align: left; cursor: pointer; border: 1px solid var(--lc-line, #e4e4e7); border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fcfbf8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 8px rgba(15, 25, 60, .05), 0 16px 34px -20px rgba(15, 25, 60, .2);
  padding: 15px 15px 14px; transition: transform .12s ease;
}
.lc-deck > .lc-deck__card:only-child { width: 100%; min-width: 100%; }
.lc-deck__card:active { transform: scale(.99); }
.lc-deck__top { display: flex; align-items: center; justify-content: space-between; }
.lc-livepill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono, ui-monospace, monospace); font-size: 10px; letter-spacing: .5px; font-weight: 700; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.lc-livepill__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: lcHeroPulse 1.8s ease-in-out infinite; }
.lc-livepill.is-live { color: #1f9d55; background: #e7f6ee; }
.lc-livepill.is-ok { color: #00814c; background: #e5f5ec; }
.lc-livepill.is-prep { color: var(--lc-accent, #0071e3); background: var(--lc-accent-soft, #eef4ff); }
.lc-livepill.is-warn { color: #b7791f; background: #fbf1e2; }
.lc-deck__no { font-family: var(--font-mono, ui-monospace, monospace); font-size: 11px; color: var(--lc-ink-3, #71717a); font-variant-numeric: tabular-nums; }
/* Titular con contexto: "Tu pedido va en camino / en preparación" (Diego: dejar claro que es SU pedido). */
.lc-deck__head { font-family: var(--font-serif, Georgia, serif); font-size: 19px; font-weight: 500; letter-spacing: -.4px; color: var(--lc-ink, #09090b); margin-top: 11px; line-height: 1.12; }
.lc-deck__eta { display: flex; align-items: baseline; gap: 6px; margin-top: 5px; font-family: var(--font-sans); font-size: 12.5px; color: var(--lc-ink-3, #71717a); }
.lc-deck__eta span { color: var(--lc-ink-3, #71717a); }
.lc-deck__eta b { font-weight: 700; color: var(--lc-ink-2, #3f3f46); font-variant-numeric: tabular-nums; }

/* ── Línea de tiempo del deck: REUSA la barra segmentada del hilo (.ptcard__track,
      definida en card-css.ts) — más simétrica y elegante. Aquí solo el espaciado. ── */
.lc-deck .lc-deck__track { padding: 14px 0 2px; }

/* ── Pulso de actividad ── */
.lc-deck__pulse { display: flex; align-items: center; gap: 7px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--lc-line, #e4e4e7); font-family: var(--font-mono, ui-monospace, monospace); font-size: 10.5px; letter-spacing: .2px; color: var(--lc-ink-2, #3f3f46); }
.lc-livedot-sm { width: 6px; height: 6px; border-radius: 50%; background: #1f9d55; flex-shrink: 0; animation: lcHeroPulse 1.8s ease-in-out infinite; }

/* ── Tarjeta del carrito en el deck ── */
.lc-deck__card--cart { display: flex; flex-direction: column; }
.lc-deck__klabel { font-family: var(--font-mono, ui-monospace, monospace); font-size: 10px; letter-spacing: .6px; text-transform: uppercase; color: var(--lc-ink-4, #a1a1aa); font-weight: 600; }
.lc-deck__total { font-family: var(--font-serif, Georgia, serif); font-size: 21px; font-weight: 500; color: var(--lc-ink, #09090b); margin-top: 10px; font-variant-numeric: tabular-nums; }
.lc-deck__csub { font-family: var(--font-sans); font-size: 12px; color: var(--lc-ink-3, #71717a); margin-top: 3px; }
.lc-deck__pay { align-self: flex-start; margin-top: 14px; padding: 9px 16px; border-radius: 11px; background: var(--lc-accent, #0071e3); color: #fff; font-family: var(--font-sans); font-size: 13px; font-weight: 700; }

/* ── Paginador ── */
.lc-deck__pager { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.lc-deck__pager span { width: 6px; height: 6px; border-radius: 3px; background: var(--lc-line-s, #ececef); transition: width .3s ease; }
.lc-deck__pager span.is-on { width: 18px; background: var(--lc-accent, #0071e3); }

/* ── Tarjeta base del héroe (relieve premium en claro) — asistente y "viendo una tela" ── */
.lc-hcard {
  background: linear-gradient(180deg, #fff 0%, #fcfbf8 100%);
  border: 1px solid var(--lc-line, #e4e4e7); border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 8px rgba(15, 25, 60, .05), 0 18px 40px -20px rgba(15, 25, 60, .2);
  padding: 18px;
}

/* ── Estado "viendo una tela" (PDP) ── */
.lc-viendo__head { display: flex; gap: 13px; align-items: center; }
.lc-viendo__sw { width: 60px; height: 60px; border-radius: 13px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--lc-line, #e4e4e7); background: repeating-linear-gradient(135deg, #efe6d4 0 6px, #e9ddc7 6px 12px); }
.lc-viendo__main { min-width: 0; }
.lc-viendo__kick { font-family: var(--font-mono, ui-monospace, monospace); font-size: 9.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--lc-accent, #0071e3); }
.lc-viendo__name { font-family: var(--font-serif, Georgia, serif); font-size: 19px; font-weight: 500; letter-spacing: -.3px; color: var(--lc-ink, #09090b); margin-top: 3px; line-height: 1.1; }
.lc-viendo__price { font-family: var(--font-sans); font-size: 13px; color: var(--lc-ink-2, #3f3f46); margin-top: 3px; font-variant-numeric: tabular-nums; }
.lc-viendo__price span { color: var(--lc-ink-3, #71717a); }
.lc-viendo__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lc-viendo__chip { padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--lc-accent, #0071e3); background: #fff; color: var(--lc-accent, #0071e3); font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s ease; }
.lc-viendo__chip:hover { background: var(--lc-accent-soft, #eef4ff); }
.lc-assist__kick { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono, ui-monospace, monospace); font-size: 10px; letter-spacing: .7px; text-transform: uppercase; color: var(--lc-accent, #0071e3); font-weight: 600; }
.lc-assist__kick svg { width: 14px; height: 14px; }
.lc-assist__q { margin: 10px 0 0; font-family: var(--font-serif, Georgia, serif); font-size: 27px; font-weight: 500; letter-spacing: -.6px; color: var(--lc-ink, #09090b); line-height: 1.08; }
.lc-assist__sub { margin: 6px 0 0; font-family: var(--font-sans); font-size: 13px; color: var(--lc-ink-2, #3f3f46); line-height: 1.5; }
.lc-assist__field { width: 100%; margin-top: 14px; height: 50px; border-radius: 13px; border: 1px solid var(--lc-line-s, #ececef); background: var(--lc-s2, #f4f4f5); display: flex; align-items: center; gap: 11px; padding: 0 12px 0 14px; cursor: text; font: inherit; }
.lc-assist__spark { color: var(--lc-accent, #0071e3); display: flex; flex-shrink: 0; }
.lc-assist__ph { flex: 1; text-align: left; font-family: var(--font-sans); font-size: 14px; color: var(--lc-ink-4, #a1a1aa); }
.lc-assist__go { width: 34px; height: 34px; border-radius: 10px; background: var(--lc-accent, #0071e3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lc-assist__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lc-assist__chip { padding: 8px 13px; border-radius: 999px; border: 1px solid var(--lc-line-s, #ececef); background: #fff; color: var(--lc-ink-2, #3f3f46); font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.lc-assist__chip:hover { border-color: var(--lc-accent, #0071e3); color: var(--lc-accent, #0071e3); }

@keyframes lcHeroPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.7); } }
@keyframes lcHeroRing { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lc-livepill__dot, .lc-livedot-sm { animation: none !important; } }

/* ── Dimensiones del panel = Intercom (~400×704) + esquinas más redondeadas (Diego 2026-07-18).
      Solo escritorio; en móvil el panel sigue a pantalla completa (igual que Intercom). ── */
@media (min-width: 641px) {
  .lc-panel__sheet { width: 400px; height: min(704px, calc(100vh - 108px)); border-radius: 28px; pointer-events: auto; }
  /* El widget FLOTA (como Intercom): la página detrás sigue usable con el chat abierto.
     El contenedor ocupa toda la pantalla pero NO captura clics; solo el panel lo hace.
     En móvil no aplica: ahí el chat es pantalla completa y sí debe bloquear. */
  .lc-panel, .lc-panel__backdrop { pointer-events: none; }
}

/* ── Más aire en el header + iconos de la barra más grandes (= Intercom, Diego 2026-07-18).
      Aplica en escritorio Y móvil. ── */
.lc-hero { padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 20px; }
@media (min-width: 641px) { .lc-hero { padding-top: 24px; } }
.lc-hero__row { margin-top: 20px; }            /* espacio logo→saludo (era 14) */
.lc-hero__reply { margin-top: 9px; }           /* espacio saludo→"respondemos…" (era 7) */
/* Barra inferior: iconos 24 (eran 19), labels y tap targets más generosos como Intercom. */
.lc-bar { padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); }
.lc-bar__tab { gap: 4px; padding: 8px 4px; font-size: 11.5px; }
.lc-bar__tab svg { width: 24px; height: 24px; }

/* ── Header UNIFICADO y simple de las pestañas (Mensajes/Ayuda/Noticias) = Intercom:
      solo el título centrado, sin subtítulo de relleno; consistente en las tres (Diego 2026-07-18). ── */
.lc-tabhead--simple { flex-shrink: 0; padding: calc(15px + env(safe-area-inset-top, 0px)) 14px 12px; border-bottom: 1px solid var(--lc-line, #e4e4e7); background: var(--lc-surface, #fff); }
.lc-tabhead--simple .lc-tabhead__bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 34px; }
.lc-tabhead--simple .lc-tabhead__t { grid-column: 2; text-align: center; font-family: var(--font-sans); font-size: 16px; font-weight: 700; letter-spacing: -0.2px; color: var(--lc-ink, #09090b); white-space: nowrap; }
.lc-tabhead--simple .lc-tabhead__acts { grid-column: 3; justify-self: end; display: flex; gap: 6px; }
.lc-tabhead--simple .lc-help__field { margin-top: 12px; }
