/* Asistente de reservas · lo comparten booking.html y landing.html.
   Vivía dentro de booking.html hasta el 18-10-2026, cuando el asistente pasó a
   poder mostrarse también en la página pública. Una sola copia: cualquier arreglo
   acá llega a las dos páginas. */
.cbw-toggle {
  position: fixed; bottom: 20px; right: 20px; z-index: 9500;
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--biz-primary, var(--color-accent, #f6530f)); color: #fff;
  font-size: 24px; box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
}
.cbw-hint {
  position: fixed; bottom: 88px; right: 20px; z-index: 9499;
  max-width: 240px; background: #fff; color: var(--color-text, #1f2937);
  font-size: 14px; line-height: 1.35; font-weight: 700;
  padding: 12px 14px; border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 10px 24px rgba(0,0,0,0.16);
  opacity: 0; transform: translateY(8px) scale(0.98);
  pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease;
  display: none;
}
.cbw-hint::after {
  content: ""; position: absolute; right: 18px; bottom: -8px;
  width: 16px; height: 16px; background: #fff;
  transform: rotate(45deg); border-radius: 3px;
}
/* Solo existe si el negocio tiene el chatbot habilitado. */
.cbw-hint--ready { display: block; }
.cbw-hint--show { opacity: 1; transform: translateY(0) scale(1); }
@media (max-width: 480px) {
  .cbw-hint { max-width: 210px; font-size: 13px; padding: 10px 12px; }
}
.cbw-panel {
  position: fixed; bottom: 88px; right: 20px; z-index: 9500;
  width: 340px; max-width: calc(100vw - 32px); height: 460px; max-height: calc(100vh - 140px);
  background: #fff; border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  display: none; flex-direction: column; overflow: hidden;
}
.cbw-panel--open { display: flex; }
.cbw-panel--keyboard {
  bottom: auto !important;
  max-height: none !important;
}
.cbw-header {
  background: var(--biz-primary, var(--color-accent, #f6530f)); color: #fff;
  padding: 14px 16px; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
}
.cbw-header button {
  background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; line-height: 1;
}
.cbw-disclaimer {
  margin: 0; padding: 8px 12px; background: #fff8e6; border-bottom: 1px solid #f3d99b;
  font-size: 11.5px; line-height: 1.4; color: #7a5200;
}
.cbw-disclaimer a { color: #7a5200; font-weight: 700; }
.cbw-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.cbw-msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.cbw-msg--bot { align-self: flex-start; background: #f1f1f1; color: #1f2937; }
.cbw-msg--user { align-self: flex-end; background: var(--biz-primary, var(--color-accent, #f6530f)); color: #fff; }
.cbw-msg__link { color: var(--biz-primary, var(--color-accent, #d9480f)); font-weight: 700; overflow-wrap: anywhere; }
.cbw-msg--error { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.cbw-retry {
  border: 1px solid var(--biz-primary, var(--color-accent, #f6530f)); border-radius: 999px;
  padding: 5px 10px; background: #fff; color: var(--biz-primary, var(--color-accent, #f6530f));
  font: inherit; font-weight: 600; cursor: pointer;
}
.cbw-msg--typing { display: inline-flex; align-items: center; gap: 4px; min-height: 18px; }
.cbw-typing-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #9ca3af;
  animation: cbw-typing-bounce 1.2s infinite ease-in-out;
}
.cbw-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.cbw-typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes cbw-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-3px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .cbw-typing-dot { animation: none; opacity: 0.75; }
}
.cbw-phone-step { padding: 12px; border-top: 1px solid #eee; }
.cbw-phone-step p { margin: 0 0 8px; font-size: 12px; color: #6b7280; }
.cbw-phone-step input {
  width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13px; margin-bottom: 8px;
}
.cbw-phone-step .cbw-phone-actions { display: flex; gap: 8px; }
.cbw-phone-step button {
  flex: 1; border: none; border-radius: 8px; padding: 8px 10px; font-size: 12px; cursor: pointer;
}
.cbw-phone-actions .cbw-primary { background: var(--biz-primary, var(--color-accent, #f6530f)); color: #fff; }
.cbw-phone-actions .cbw-secondary { background: #f1f1f1; color: #374151; }
.cbw-input-row { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eee; }
.cbw-input-row input {
  flex: 1; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 20px; font-size: 13px;
}
.cbw-input-row button {
  border: none; border-radius: 50%; width: 34px; height: 34px; flex-shrink: 0;
  background: var(--biz-primary, var(--color-accent, #f6530f)); color: #fff; cursor: pointer;
}
.cbw-input-row button:disabled { opacity: 0.5; cursor: default; }
