@font-face {
  font-family: "Archivo";
  font-weight: 500 900;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url(/fonts/archivo.woff2) format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 400 600;
  font-display: swap;
  src: url(/fonts/inter.woff2) format("woff2");
}

:root {
  --ink: #0e1116;
  --paper: #f5f4ef;
  --muted: #a7adb8;
  --accent: #c8f04a;
  --accent-ink: #11140a;
  --negocio: #1f7a68;
  --wa-fondo: #efeae2;
  --wa-saliente: #d9fdd3;
  --wa-texto: #111b21;
  --wa-gris: #667781;
  --wa-azul: #027eb5;
  --display: "Archivo", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 400 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.pagina { display: flex; flex-direction: column; height: 100dvh; }

/* Celular: barra compacta arriba y el chat ocupa el resto. */
.info { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.info__texto { display: none; }
.cta__resto { display: none; }
.marca { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; color: var(--paper); text-decoration: none; font: 700 16px/1 var(--display); }
.marca img { width: 28px; height: 28px; }
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 14px/1.2 var(--body); text-decoration: none; text-align: center; }

.telefono { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--wa-fondo); color: var(--wa-texto); }

@media (min-width: 900px) {
  .pagina { flex-direction: row; align-items: center; justify-content: center; gap: 64px; padding: 32px; }
  .info { flex-direction: column; align-items: flex-start; justify-content: center; gap: 28px; max-width: 420px; padding: 0; }
  .info__texto { display: block; }
  .info h1 { margin: 0 0 16px; font: 800 40px/1.08 var(--display); font-stretch: 110%; text-wrap: balance; }
  .info p { margin: 0 0 16px; color: #d7dae0; }
  .antetitulo { color: var(--accent) !important; font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
  .pruebas { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 8px; }
  .pruebas li { padding-left: 22px; position: relative; }
  .pruebas li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
  .nota { font-size: 14px; color: var(--muted) !important; }
  .cta { min-height: 52px; padding: 12px 26px; font-size: 16px; }
  .cta__resto { display: inline; margin-left: .25em; }
  .telefono { flex: 0 0 400px; height: min(780px, 100dvh - 64px); border-radius: 28px; overflow: hidden; box-shadow: 0 0 0 10px #1b2029, 0 30px 80px rgba(0, 0, 0, .5); }
}

/* Chat */
.wa-cabecera { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--negocio); color: #fff; }
.wa-avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--negocio); font: 700 18px/1 var(--display); }
.wa-nombre { margin: 0; font-weight: 600; line-height: 1.3; }
.wa-estado { margin: 0; font-size: 13px; line-height: 1.3; opacity: .85; }

.wa-chat {
  flex: 1; overflow-y: auto; padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 6px;
  background-color: var(--wa-fondo);
  background-image: radial-gradient(rgba(0, 0, 0, .045) 1px, transparent 1px);
  background-size: 18px 18px;
}

.aviso { align-self: center; max-width: 90%; margin: 6px 0; padding: 6px 12px; border-radius: 8px; background: #fff3c4; color: #54656f; font-size: 13px; text-align: center; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
.aviso--derivar { background: #e7f3ff; color: #1d4a6b; }
.aviso a { color: var(--wa-azul); font-weight: 600; }

.globo { position: relative; max-width: 85%; padding: 6px 8px 4px 9px; border-radius: 8px; background: #fff; font-size: 15px; line-height: 1.4; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); overflow-wrap: anywhere; }
.globo--entrante { align-self: flex-start; border-top-left-radius: 0; }
.globo--saliente { align-self: flex-end; border-top-right-radius: 0; background: var(--wa-saliente); }
.globo__texto { white-space: pre-wrap; }
.globo__hora { float: right; margin: 6px 0 -4px 10px; color: var(--wa-gris); font-size: 11px; line-height: 1.6; }
.globo__hora svg { width: 16px; height: 11px; margin-left: 3px; vertical-align: -1px; fill: #8696a0; }
.globo--leido svg { fill: #53bdeb; }

.botones { align-self: flex-start; display: grid; gap: 4px; width: min(85%, 320px); margin-top: -2px; }
.botones button, .sugerencias button { min-height: 40px; padding: 8px 12px; border: 0; border-radius: 8px; background: #fff; color: var(--wa-azul); font: 500 15px/1.2 var(--body); cursor: pointer; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
.botones button:hover, .sugerencias button:hover { background: #f5f6f6; }
.botones button:disabled, .sugerencias button:disabled { color: var(--wa-gris); cursor: default; }
.sugerencias { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 4px; }
.sugerencias button { min-height: 36px; border-radius: 999px; font-size: 14px; }

.escribiendo { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; border-radius: 8px; border-top-left-radius: 0; background: #fff; }
.escribiendo span { width: 7px; height: 7px; border-radius: 50%; background: #8696a0; animation: salto 1.2s infinite; }
.escribiendo span:nth-child(2) { animation-delay: .15s; }
.escribiendo span:nth-child(3) { animation-delay: .3s; }
@keyframes salto { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .escribiendo span { animation: none; } }

.wa-escribir { display: flex; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #f0f2f5; }
.wa-escribir input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 22px; background: #fff; color: var(--wa-texto); font: 400 16px/1.2 var(--body); }
.wa-escribir button { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--negocio); cursor: pointer; }
.wa-escribir button:disabled { opacity: .5; cursor: default; }
.wa-escribir svg { width: 22px; height: 22px; fill: #fff; }
