/* ══════════════════════════════════════════════════════════
   empresarial.cloud — demo interactiva
   Reutiliza los tokens y el componente .phone de styles.css
   ══════════════════════════════════════════════════════════ */

:root {
  --taco: #f2953f;
  --taco-glo: rgba(242, 149, 63, 0.28);
}

/* ── encabezado de la demo ── */

.demo {
  position: relative;
  padding: clamp(6.5rem, 13vh, 8.5rem) 0 clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}
.demo__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(48% 40% at 80% 12%, rgba(37, 211, 102, 0.12), transparent 70%),
    radial-gradient(42% 38% at 12% 90%, rgba(226, 189, 140, 0.07), transparent 70%);
}
.demo__head { max-width: 720px; margin: 0 auto 2.4rem; text-align: center; }
.demo__head h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.demo__head .lead {
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  margin: 1.1rem auto 0;
  max-width: 40em;
}
.demo__head .lead strong { color: var(--ink); }

/* ── selector de agentes ── */

.switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  max-width: 760px;
  margin: 0 auto 2rem;
}

.agent-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1.05rem 0.6rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.agent-btn:hover { transform: translateY(-2px); color: var(--ink); border-color: rgba(255,255,255,0.2); }
.agent-btn__emoji {
  width: 34px; height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.05rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}
.agent-btn__txt { display: grid; line-height: 1.15; text-align: left; }
.agent-btn__txt b { color: inherit; font-weight: 700; }
.agent-btn__txt span { font-size: 0.72rem; font-weight: 500; color: var(--dim-2); }

.agent-btn.is-active {
  color: var(--ink);
  border-color: var(--accent, var(--green));
  background: color-mix(in srgb, var(--accent, var(--green)) 12%, transparent);
  box-shadow: 0 8px 26px color-mix(in srgb, var(--accent, var(--green)) 22%, transparent);
}
.agent-btn.is-active .agent-btn__emoji {
  background: var(--accent, var(--green));
  border-color: transparent;
}

/* ── teléfono interactivo ── */

.stage { display: flex; justify-content: center; }

.phone--live {
  width: min(400px, 100%);
  --accent: var(--green);
}
.phone--live .phone__avatar { background: linear-gradient(160deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000)); color: #0a0a0a; }

.phone__chat--live {
  height: min(52vh, 460px);
  min-height: 340px;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.phone__chat--live::-webkit-scrollbar { width: 6px; }
.phone__chat--live::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }

.msg strong { color: #fff; font-weight: 700; }
.msg--in a, .msg--out a { color: #8fd6ff; text-decoration: underline; }
.msg__img {
  display: block;
  width: 100%;
  max-width: 260px;
  border-radius: 10px;
  margin: 0.4rem 0;
  background: #fff;
}
.msg--err {
  align-self: center;
  background: rgba(255, 99, 99, 0.12);
  border: 1px solid rgba(255, 99, 99, 0.3);
  color: #ffb3b3;
  font-size: 0.8rem;
  text-align: center;
  max-width: 90%;
}

/* barra de entrada real */
.phone__form {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  padding: 0.6rem 0.7rem;
  background: #14222b;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.phone__input {
  flex: 1;
  min-width: 0;
  background: #0b141a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 0.9rem;
  outline: none;
}
.phone__input::placeholder { color: #5f7168; }
.phone__input:focus { border-color: var(--accent, var(--green)); }
.phone__send {
  flex: none;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(160deg, var(--accent, #2ee06f), color-mix(in srgb, var(--accent, #1db457) 65%, #000));
  color: #04140a;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}
.phone__send svg { width: 20px; height: 20px; fill: currentColor; }
.phone__send:hover { transform: scale(1.06); filter: brightness(1.05); }
.phone__send:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: grayscale(0.3); }

/* chips de sugerencia */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.3rem;
  max-width: 460px;
  margin-inline: auto;
}
.chip {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.chip:hover { color: var(--ink); border-color: var(--accent, var(--green)); transform: translateY(-1px); }

.stage__note {
  text-align: center;
  font-size: 0.84rem;
  color: var(--dim-2);
  margin-top: 1.5rem;
  max-width: 40em;
  margin-inline: auto;
}
.stage__note strong { color: var(--green); }

/* franja CTA hacia WhatsApp real */
.demo-cta {
  text-align: center;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.demo-cta h2 { max-width: 16em; margin: 0 auto 1.4rem; }
.demo-cta p { max-width: 34em; margin: 0 auto 2rem; }

@media (max-width: 560px) {
  .agent-btn__txt span { display: none; }
  .phone--live { width: 100%; }
  .phone__chat--live { height: 56vh; }
}
