/* Asistente Gisety · v1.5.0 · colores de marca: azul #1877F2, fondo #F2F8FF */
:root {
  --gc-blue: #1877F2;
  --gc-blue-dark: #0F5FCC;
  --gc-ink: #143044;
  --gc-muted: #5B7083;
  --gc-line: #DCE7F3;
  --gc-soft: #F2F8FF;
  --gc-white: #FFFFFF;
  --gc-wa: #1FA855;
  --gc-shadow: 0 18px 48px rgba(20, 48, 68, .18), 0 2px 8px rgba(20, 48, 68, .08);
}

.gc-launch, .gc-panel, .gc-teaser { font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; box-sizing: border-box; }
.gc-panel *, .gc-teaser * { box-sizing: border-box; }

/* Botón de apertura, encima del botón de WhatsApp */
.gc-launch {
  position: fixed; right: 16px; bottom: 88px; z-index: 9991;
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 18px 0 14px; border: 0; border-radius: 10px;
  background: var(--gc-blue); color: var(--gc-white);
  font-size: 15px; font-weight: 600; letter-spacing: .01em; line-height: 1;
  box-shadow: 0 8px 22px rgba(24, 119, 242, .35); cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.gc-launch::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5CE08A;
  box-shadow: 0 0 0 3px rgba(92, 224, 138, .25);
}
.gc-launch:hover { background: var(--gc-blue-dark); transform: translateY(-1px); }
.gc-launch:focus-visible { outline: 3px solid #9CC4FF; outline-offset: 2px; }
.gc-launch.gc-hidden { display: none; }

/* Aviso de bienvenida (una vez por visita) */
.gc-teaser {
  position: fixed; right: 16px; bottom: 146px; z-index: 9991; max-width: 270px;
  display: flex; align-items: flex-start; gap: 4px;
  background: var(--gc-white); color: var(--gc-ink); border: 1px solid var(--gc-line); border-radius: 12px;
  box-shadow: var(--gc-shadow); padding: 12px 8px 12px 14px; animation: gc-in .25s ease;
}
.gc-teaser[hidden] { display: none; }
.gc-teaser-text { all: unset; cursor: pointer; font-size: 14px; line-height: 1.45; color: var(--gc-ink); }
.gc-teaser-close { all: unset; cursor: pointer; font-size: 18px; line-height: 1; color: var(--gc-muted); padding: 0 4px; }

/* Panel */
.gc-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 9995;
  width: 400px; height: min(660px, calc(100vh - 32px));
  display: flex; flex-direction: column;
  background: var(--gc-white); color: var(--gc-ink); border: 1px solid var(--gc-line); border-radius: 14px;
  box-shadow: var(--gc-shadow); overflow: hidden; animation: gc-in .22s ease;
}
.gc-panel[hidden] { display: none; }
@keyframes gc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.gc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--gc-line); background: var(--gc-white); }
.gc-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gc-logo { flex: none; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--gc-blue); color: #fff; font-weight: 800; font-size: 18px; }
.gc-titles { min-width: 0; }
.gc-title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.2; color: var(--gc-ink); letter-spacing: 0; }
.gc-sub { margin: 2px 0 0; font-size: 12px; color: var(--gc-muted); line-height: 1.2; display: flex; align-items: center; gap: 6px; }
.gc-sub::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2DBE60; }
.gc-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.gc-lang { height: 32px; max-width: 104px; border: 1px solid var(--gc-line); border-radius: 7px; background: var(--gc-white); color: var(--gc-ink); font-size: 12px; padding: 0 6px; cursor: pointer; }
.gc-foot-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.gc-reset { all: unset; flex: none; cursor: pointer; font-size: 12px; color: var(--gc-muted); text-decoration: underline; }
.gc-reset:hover { color: var(--gc-blue); }
.gc-close { all: unset; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; font-size: 22px; line-height: 1; color: var(--gc-muted); border-radius: 7px; }
.gc-close:hover { background: var(--gc-soft); color: var(--gc-ink); }
.gc-reset:focus-visible, .gc-close:focus-visible, .gc-lang:focus-visible { outline: 2px solid var(--gc-blue); outline-offset: 1px; }

/* Conversación */
.gc-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--gc-soft); overscroll-behavior: contain; }
.gc-msg { max-width: 86%; padding: 10px 13px; border-radius: 12px; font-size: 14px; line-height: 1.5; white-space: pre-line; word-wrap: break-word; }
.gc-bot { align-self: flex-start; background: var(--gc-white); color: var(--gc-ink); border: 1px solid var(--gc-line); border-top-left-radius: 4px; }
.gc-user { align-self: flex-end; background: var(--gc-blue); color: #fff; border-top-right-radius: 4px; }
.gc-cta { font-size: 13px; color: var(--gc-muted); background: transparent; border: 0; padding: 0 2px; }
.gc-note { margin: 0; font-size: 12px; color: var(--gc-muted); }
.gc-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.gc-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9FB3C8; animation: gc-dot 1.1s infinite ease-in-out; }
.gc-typing i:nth-child(2) { animation-delay: .15s; } .gc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes gc-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Fichas */
.gc-cards { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.gc-card { display: flex; gap: 12px; padding: 10px; background: var(--gc-white); border: 1px solid var(--gc-line); border-radius: 10px; transition: border-color .15s ease, box-shadow .15s ease; }
.gc-card.gc-clickable { cursor: pointer; }
.gc-card.gc-clickable:hover { border-color: #B8D3F5; box-shadow: 0 4px 14px rgba(24, 119, 242, .10); }
.gc-card img { flex: none; width: 76px; height: 76px; object-fit: cover; border-radius: 7px; background: var(--gc-soft); }
.gc-card-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.gc-card-title { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--gc-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; letter-spacing: 0; }
.gc-card-meta, .gc-card-note { margin: 0; font-size: 12px; line-height: 1.4; color: var(--gc-muted); }
.gc-card-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gc-card-price { margin: 2px 0 0; font-size: 15px; font-weight: 700; color: var(--gc-ink); }
.gc-card-link { margin-top: auto; padding-top: 4px; font-size: 13px; font-weight: 600; color: var(--gc-blue); text-decoration: none; }
.gc-card-link:hover { text-decoration: underline; }
.gc-more { align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--gc-blue); text-decoration: none; }
.gc-action { align-self: flex-start; display: inline-block; padding: 9px 14px; border-radius: 8px; background: var(--gc-blue); color: #fff !important; font-size: 13px; font-weight: 600; text-decoration: none; }
.gc-action:hover { background: var(--gc-blue-dark); }
.gc-action-wa { background: var(--gc-wa); }
.gc-action-wa:hover { background: #178A45; }

/* Sugerencias */
.gc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 0; background: var(--gc-soft); }
.gc-chips[hidden] { display: none; }
.gc-chip { all: unset; cursor: pointer; font-size: 13px; line-height: 1.2; padding: 8px 11px; border-radius: 8px; background: var(--gc-white); color: var(--gc-blue); border: 1px solid #C9DDF6; font-weight: 500; }
.gc-chip:hover { border-color: var(--gc-blue); }
.gc-chip:focus-visible { outline: 2px solid var(--gc-blue); outline-offset: 1px; }

/* Caja de texto */
.gc-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px 12px 10px; background: var(--gc-soft); }
.gc-input { flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 11px 12px; border: 1px solid #C9DDF6; border-radius: 10px; background: var(--gc-white); color: var(--gc-ink); font: inherit; font-size: 16px; line-height: 1.35; outline: none; }
.gc-input:focus { border-color: var(--gc-blue); box-shadow: 0 0 0 3px rgba(24, 119, 242, .15); }
.gc-send { flex: none; height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--gc-blue); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.gc-send:hover { background: var(--gc-blue-dark); }
.gc-send:disabled { opacity: .55; cursor: wait; }

.gc-foot { padding: 8px 16px 12px; background: var(--gc-soft); border-top: 1px solid var(--gc-line); }
.gc-human, .gc-legal { margin: 0; font-size: 12px; line-height: 1.45; color: var(--gc-muted); }
.gc-human { margin-bottom: 2px; }
.gc-wa { color: var(--gc-wa); font-weight: 600; text-decoration: none; }
.gc-legal a { color: var(--gc-muted); text-decoration: underline; }

/* Móvil: pantalla completa */
@media (max-width: 560px) {
  .gc-panel { inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; padding-bottom: env(safe-area-inset-bottom); }
  .gc-launch { height: 46px; font-size: 14px; right: 12px; bottom: 86px; }
  .gc-teaser { right: 12px; bottom: 142px; max-width: calc(100vw - 24px); }
  html.gc-open, html.gc-open body { overflow: hidden; }
  html.gc-open .gisety-wa-float { display: none; }
}
@media (prefers-reduced-motion: reduce) { .gc-panel, .gc-teaser, .gc-typing i { animation: none; } }
@media print { .gc-launch, .gc-panel, .gc-teaser { display: none !important; } }
.gc-wa { white-space: nowrap; }
.gc-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.gc-action-light { background: var(--gc-white); color: var(--gc-blue) !important; border: 1px solid #C9DDF6; }
.gc-action-light:hover { background: var(--gc-soft); }

/* =====================================================================
 * Gisety 31/10/2026 · Rediseño: burbuja flotante violeta y cajón móvil
 * ===================================================================== */
.gc-launch {
  width: 56px; height: 56px; padding: 0; gap: 0; border-radius: 50%;
  justify-content: center; position: fixed;
  background: radial-gradient(circle at 30% 25%, #A78BFA 0%, #7C3AED 45%, #4C1D95 100%);
  box-shadow: 0 8px 22px rgba(76, 29, 149, .38), 0 0 18px rgba(139, 92, 246, .35);
  -webkit-tap-highlight-color: transparent;
}
.gc-launch::before {
  position: absolute; top: 3px; right: 3px; width: 11px; height: 11px;
  background: #34D399; border: 2px solid #fff; box-shadow: none;
}
.gc-launch::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 0 rgba(139, 92, 246, .55); animation: gc-glow 2.6s ease-out 1.2s 3;
}
@keyframes gc-glow { 0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, .55); } 70%, 100% { box-shadow: 0 0 0 14px rgba(139, 92, 246, 0); } }
.gc-launch:hover { background: radial-gradient(circle at 30% 25%, #A78BFA 0%, #6D28D9 50%, #3B0F7A 100%); transform: translateY(-1px) scale(1.04); }
.gc-launch:active { transform: scale(.94); }
.gc-launch:focus-visible { outline: 3px solid #C4B5FD; outline-offset: 3px; }
.gc-launch-ico { width: 28px; height: 28px; display: block; }
.gc-launch-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gc-teaser { display: none !important; }
.gc-logo { background: linear-gradient(135deg, #8B5CF6, #5B21B6); }

@media (max-width: 560px) {
  .gc-launch { width: 52px; height: 52px; right: 14px; bottom: 140px; }
  .gc-launch-ico { width: 26px; height: 26px; }
  /* Cajón inferior: deja ver la página por arriba y no bloquea el scroll */
  .gc-panel {
    inset: auto 0 0 0; width: 100%; height: min(76vh, 620px); height: min(76dvh, 620px);
    border: 0; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -12px 40px rgba(20, 48, 68, .22); animation: gc-up .28s cubic-bezier(.2, .8, .2, 1);
    transition: transform .2s ease; will-change: transform;
  }
  .gc-head { position: relative; padding: 20px 12px 10px 14px; }
  .gc-head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: #CBD5E1; }
  .gc-log { padding: 12px; gap: 8px; }
  .gc-chips { padding: 8px 12px 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .gc-chips::-webkit-scrollbar { display: none; }
  .gc-chip { white-space: nowrap; flex: none; }
  .gc-card { padding: 8px; gap: 10px; }
  .gc-card img { width: 60px; height: 60px; }
  .gc-card-note { display: none; }
  .gc-form { padding: 10px 10px 8px; }
  .gc-foot { padding: 6px 12px 8px; }
  .gc-legal { font-size: 11px; }
  html.gc-open, html.gc-open body { overflow: visible; }
  html.gc-open .gisety-wa-float { display: none; }
}
@keyframes gc-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .gc-launch::after { animation: none; } .gc-panel { animation: none; } }
