/* ==========================================================
   LE PARK — Asistente virtual
   ========================================================== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.bot { transition: opacity 0.3s; position: fixed; right: 22px; bottom: 22px; z-index: 70; font-family: var(--font-body); }

/* ---------- Botón flotante ---------- */
.bot__launcher {
  position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: #15110a;
  display: grid; place-items: center;
  box-shadow: 0 14px 34px -10px rgba(224, 187, 114, 0.75);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.bot__launcher:hover { transform: scale(1.07); }
.bot__launcher::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--gold);
  animation: botRing 2.8s infinite;
}
@keyframes botRing { from { transform: scale(1); opacity: .7; } to { transform: scale(1.55); opacity: 0; } }
.bot__launcher-icon svg { width: 28px; height: 28px; fill: none; stroke: #15110a; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bot__launcher-icon circle { fill: #15110a; stroke: none; }
.bot__launcher-icon, .bot__launcher-close {
  grid-area: 1 / 1; transition: transform 0.35s var(--ease), opacity 0.25s;
}
.bot__launcher-close { font-size: 30px; line-height: 1; opacity: 0; transform: rotate(-90deg) scale(.6); }
.bot__launcher[aria-expanded="true"] .bot__launcher-icon { opacity: 0; transform: rotate(90deg) scale(.6); }
.bot__launcher[aria-expanded="true"] .bot__launcher-close { opacity: 1; transform: none; }
.bot__launcher[aria-expanded="true"]::before { animation: none; opacity: 0; }

.bot__tip {
  position: absolute; right: 74px; bottom: 14px; white-space: nowrap;
  padding: 11px 16px; border-radius: 14px; font-size: 14px; font-weight: 500;
  background: rgba(20, 20, 25, 0.94); border: 1px solid var(--line-strong); color: var(--text);
  box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.8); backdrop-filter: blur(10px);
  animation: botTip 0.5s var(--ease-out);
}
@keyframes botTip { from { opacity: 0; transform: translateX(12px); } }

/* ---------- Panel ---------- */
.bot__panel {
  position: absolute; right: 0; bottom: 78px; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 140px));
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 24px; border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  opacity: 0; transform: translateY(16px) scale(0.97); transform-origin: bottom right;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.bot__panel.is-open { opacity: 1; transform: none; }
/* mientras está cerrado no debe tapar clicks de la página */
.bot__panel[hidden] { display: none; }
.bot__panel:not(.is-open) { pointer-events: none; }

.bot__head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(224, 187, 114, 0.12), transparent 70%);
}
.bot__logo { width: 84px; height: auto; }
.bot__title { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.bot__status { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.bot__status span { width: 7px; height: 7px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 10px var(--wa); }
.bot__close {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer;
  transition: background 0.25s;
}
.bot__close:hover { background: rgba(255, 255, 255, 0.14); }

.bot__msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.bot__msgs::-webkit-scrollbar { width: 6px; }
.bot__msgs::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

.bot__msg {
  max-width: 86%; padding: 12px 15px; font-size: 14.5px; line-height: 1.5;
  border-radius: 16px; animation: botIn 0.35s var(--ease-out);
}
@keyframes botIn { from { opacity: 0; transform: translateY(8px); } }
.bot__msg--bot { align-self: flex-start; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.bot__msg--yo { align-self: flex-end; background: var(--gold); color: #15110a; font-weight: 500; border-bottom-right-radius: 5px; }
.bot__msg b { color: var(--gold-2); font-weight: 600; }
.bot__msg--yo b { color: inherit; }

.bot__dots { display: inline-flex; gap: 4px; padding: 2px 0; }
.bot__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: botDot 1.2s infinite; }
.bot__dots i:nth-child(2) { animation-delay: 0.15s; }
.bot__dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes botDot { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.bot__actions { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; max-width: 92%; }
.bot__action {
  display: inline-block; padding: 9px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  background: var(--gold); color: #15110a; border: 0; transition: transform 0.25s var(--ease), background 0.25s;
}
.bot__action:hover { background: var(--gold-2); transform: translateY(-2px); }

.bot__chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 18px 12px; }
.bot__chips:empty { display: none; }
.bot__chip {
  padding: 8px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; color: var(--text);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong);
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}
.bot__chip:hover { border-color: var(--gold); background: rgba(224, 187, 114, 0.1); transform: translateY(-1px); }

.bot__form { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); background: rgba(8, 8, 10, 0.5); }
.bot__form input {
  flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line-strong); color: var(--text);
  border-radius: 999px; padding: 12px 16px; font: inherit; font-size: 14.5px; transition: border-color 0.2s, box-shadow 0.2s;
}
.bot__form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224, 187, 114, 0.15); }
.bot__form input::placeholder { color: #5f5c57; }
.bot__form button {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--gold); display: grid; place-items: center; transition: background 0.25s, transform 0.25s var(--ease);
}
.bot__form button:hover { background: var(--gold-2); transform: scale(1.05); }
.bot__form button svg { width: 20px; height: 20px; fill: #15110a; margin-left: 2px; }

/* WhatsApp queda arriba del asistente */
.wa-float { bottom: 94px; }

@media (max-width: 600px) {
  /* en celular los flotantes van más chicos para no tapar el contenido */
  .bot { right: 12px; bottom: 12px; }
  .wa-float { right: 12px; bottom: 70px; width: 48px; height: 48px; }
  .wa-float svg { width: 25px; height: 25px; }
  .bot__launcher { width: 48px; height: 48px; }
  .bot__launcher-icon svg { width: 23px; height: 23px; }
  .bot__tip { right: 58px; bottom: 6px; padding: 9px 13px; font-size: 13px; }
  .bot__panel {
    position: fixed; right: 0; left: 0; bottom: 0; top: auto;
    width: 100%; height: min(86vh, 640px); border-radius: 22px 22px 0 0;
    transform-origin: bottom center;
  }
  .bot__msg { max-width: 90%; font-size: 15px; }
  /* con el chat abierto, los botones flotantes molestan */
  body.bot-open .wa-float, body.bot-open .bot__launcher { opacity: 0; pointer-events: none; }
  body.bot-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .bot__panel { transition: none; }
  .bot__launcher::before { animation: none; }
}
