/* ============================================================
   Visit Sisal — Chat Widget + PWA Banner — Estilos
   ============================================================ */

/* ── PWA INSTALL BANNER ── */
#vs-install-banner {
  position: fixed;
  bottom: 96px;
  left: 16px;
  right: 16px;
  max-width: 480px;
  margin: 0 auto;
  z-index: 2000;
  animation: vsBannerIn .4s cubic-bezier(.2,.9,.3,1) both;
}
@keyframes vsBannerIn {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.vs-ib-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1a1a1a;
  border: 1px solid rgba(201,168,76,.4);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
}
.vs-ib-icon { font-size: 1.8rem; flex-shrink: 0; }
.vs-ib-text { flex: 1; }
.vs-ib-text strong { display: block; color: #f0ebe0; font-size: .95rem; }
.vs-ib-text span   { display: block; color: #888; font-size: .8rem; margin-top: 2px; }
.vs-ib-btn {
  background: #c9a84c; color: #0d0d0d;
  border: none; border-radius: 20px;
  padding: 8px 16px; font-weight: 800; font-size: .85rem;
  cursor: pointer; white-space: nowrap;
  transition: background .2s;
}
.vs-ib-btn:hover { background: #e8c96a; }
.vs-ib-x {
  background: none; border: none; color: #666;
  font-size: 1rem; cursor: pointer; padding: 4px;
  flex-shrink: 0;
}

/* ── FAB BUTTON ── */
.vs-fab {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #c9a84c;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(201,168,76,.45);
  z-index: 1500;
  transition: transform .25s, box-shadow .25s, background .2s;
}
.vs-fab:hover { transform: scale(1.1); box-shadow: 0 12px 40px rgba(201,168,76,.6); }
.vs-fab.vs-fab-open { background: #1a1a1a; border: 1px solid rgba(201,168,76,.4); }
.vs-fab.vs-fab-thinking .vs-fab-icon { animation: vsFabPulse 1s ease-in-out infinite; }
@keyframes vsFabPulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.vs-fab-icon { font-size: 1.5rem; }

/* ── CHAT PANEL ── */
.vs-panel {
  position: fixed;
  right: 16px; bottom: 90px;
  width: 360px; max-width: calc(100vw - 32px);
  height: 520px; max-height: calc(100vh - 120px);
  background: #111;
  border: 1px solid rgba(201,168,76,.25);
  border-radius: 20px;
  display: flex; flex-direction: column;
  z-index: 1400;
  box-shadow: 0 20px 60px rgba(0,0,0,.7);
  transform: scale(.9) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform .3s cubic-bezier(.2,.9,.3,1), opacity .3s;
}
.vs-panel.vs-panel-open {
  transform: none;
  opacity: 1;
  pointer-events: all;
}

/* Header */
.vs-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: #161616;
  border-radius: 20px 20px 0 0;
}
.vs-panel-info { display: flex; align-items: center; gap: 10px; }
.vs-panel-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #4ecba5;
  box-shadow: 0 0 0 0 rgba(78,203,165,.5);
  animation: vsDotPing 2s infinite;
}
@keyframes vsDotPing {
  0%  { box-shadow: 0 0 0 0 rgba(78,203,165,.5); }
  70% { box-shadow: 0 0 0 8px rgba(78,203,165,0); }
  100%{ box-shadow: 0 0 0 0 rgba(78,203,165,0); }
}
.vs-panel-info strong { display: block; color: #f0ebe0; font-size: .95rem; }
.vs-panel-sub { color: #888; font-size: .75rem; }
.vs-close {
  background: none; border: none; color: #666;
  font-size: 1.1rem; cursor: pointer; padding: 4px;
  transition: color .2s;
}
.vs-close:hover { color: #f0ebe0; }

/* Messages */
.vs-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.vs-msgs::-webkit-scrollbar { width: 4px; }
.vs-msgs::-webkit-scrollbar-track { background: transparent; }
.vs-msgs::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

.vs-msg { max-width: 88%; display: flex; flex-direction: column; }
.vs-msg p {
  margin: 0;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: .9rem;
  line-height: 1.45;
}
.vs-msg-user { align-self: flex-end; }
.vs-msg-user p { background: #c9a84c; color: #0d0d0d; border-bottom-right-radius: 4px; }
.vs-msg-bot { align-self: flex-start; }
.vs-msg-bot p { background: #1e1e1e; color: #d4cfc5; border-bottom-left-radius: 4px; border: 1px solid rgba(255,255,255,.08); }

/* Typing indicator */
.vs-typing {
  align-self: flex-start;
}
.vs-typing span {
  display: inline-block;
  width: 7px; height: 7px;
  background: #c9a84c;
  border-radius: 50%;
  margin: 12px 3px;
  animation: vsTyping .9s ease-in-out infinite;
}
.vs-typing span:nth-child(2) { animation-delay: .15s; }
.vs-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes vsTyping { 0%,80%,100%{transform:translateY(0)} 40%{transform:translateY(-6px)} }

/* Chips de sugerencia */
.vs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.vs-chip {
  background: rgba(201,168,76,.12);
  border: 1px solid rgba(201,168,76,.3);
  color: #c9a84c;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: .78rem;
  cursor: pointer;
  transition: background .18s;
}
.vs-chip:hover { background: rgba(201,168,76,.25); }

/* Links del bot */
.vs-link-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vs-link-btn {
  background: rgba(201,168,76,.15);
  border: 1px solid rgba(201,168,76,.3);
  color: #c9a84c;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: .75rem;
  text-decoration: none;
  transition: background .18s;
}
.vs-link-btn:hover { background: rgba(201,168,76,.3); color: #e8c96a; }

/* Input row */
.vs-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: #161616;
  border-radius: 0 0 20px 20px;
}
#vs-chat-input {
  flex: 1;
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,.1);
  color: #f0ebe0;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
}
#vs-chat-input:focus { border-color: #c9a84c; }
#vs-chat-input::placeholder { color: #555; }
.vs-send {
  background: #c9a84c;
  border: none;
  color: #0d0d0d;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
}
.vs-send:hover { background: #e8c96a; transform: scale(1.08); }

/* Mobile */
@media (max-width: 480px) {
  .vs-panel { right: 8px; left: 8px; width: auto; height: 75vh; bottom: 80px; }
  .vs-fab   { right: 14px; bottom: 14px; }
}
