/* Chat de Valentina embebido en la tienda. Estética Glamour (fucsia/rosa, Poppins). */
.glchat-launcher {
  position: fixed; right: 20px; bottom: 88px; z-index: 92;
  display: flex; align-items: center; gap: 0;
  height: 58px; padding: 0; border-radius: 30px;
  background: linear-gradient(135deg, var(--fucsia), var(--fucsia-claro));
  color: #fff; box-shadow: 0 10px 26px rgba(216, 27, 122, .42);
  transition: transform .2s, box-shadow .2s; overflow: hidden;
}
.glchat-launcher:hover { transform: scale(1.06); box-shadow: var(--sombra-hover); }
.glchat-launcher .ico { width: 58px; height: 58px; display: grid; place-items: center; font-size: 26px; flex: 0 0 58px; }
.glchat-launcher .txt { font-weight: 600; font-size: 14.5px; white-space: nowrap; padding-right: 22px; }
@media (max-width: 560px) { .glchat-launcher .txt { display: none; } .glchat-launcher { padding: 0; } }
body.con-barra .glchat-launcher { bottom: 92px; }

/* burbuja de saludo que aparece sola */
.glchat-nudge {
  position: fixed; right: 20px; bottom: 154px; z-index: 92; max-width: 240px;
  background: #fff; color: var(--negro); padding: 12px 14px; border-radius: 16px 16px 4px 16px;
  box-shadow: var(--sombra); font-size: 13.5px; line-height: 1.4;
  border: 1px solid var(--gris-claro); cursor: pointer;
  animation: glchatNudge .4s ease both;
}
.glchat-nudge b { color: var(--fucsia); }
.glchat-nudge .cerrar-nudge { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: var(--negro); color: #fff; font-size: 14px; line-height: 22px; text-align: center; }
@keyframes glchatNudge { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ventana */
.glchat-ventana {
  position: fixed; right: 20px; bottom: 20px; z-index: 93;
  width: 380px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 40px);
  display: none; flex-direction: column; overflow: hidden;
  background: var(--crema); border-radius: 20px; box-shadow: 0 22px 60px rgba(36, 26, 32, .28);
  border: 1px solid var(--gris-claro);
}
.glchat-ventana.abierta { display: flex; animation: glchatIn .28s ease both; }
@keyframes glchatIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .glchat-ventana { right: 0; bottom: 0; width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; } }

.glchat-cab { display: flex; align-items: center; gap: 11px; padding: 13px 14px; background: linear-gradient(135deg, var(--fucsia), var(--fucsia-osc)); color: #fff; }
.glchat-cab .avatar { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 22px; flex: 0 0 42px; }
.glchat-cab .quien { flex: 1; min-width: 0; }
.glchat-cab .quien b { display: block; font-size: 15px; }
.glchat-cab .quien small { display: flex; align-items: center; gap: 6px; font-size: 12px; opacity: .92; }
.glchat-cab .punto { width: 8px; height: 8px; border-radius: 50%; background: #6ee787; box-shadow: 0 0 0 3px rgba(110,231,135,.3); }
.glchat-cab .cerrar-chat { color: #fff; font-size: 26px; line-height: 1; width: 34px; height: 34px; border-radius: 50%; }
.glchat-cab .cerrar-chat:hover { background: rgba(255,255,255,.18); }

.glchat-cuerpo { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.glchat-msg { max-width: 82%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.42; white-space: pre-wrap; word-wrap: break-word; }
.glchat-msg.val { align-self: flex-start; background: #fff; color: var(--negro); border: 1px solid var(--gris-claro); border-bottom-left-radius: 5px; }
.glchat-msg.cli { align-self: flex-end; background: linear-gradient(135deg, var(--fucsia), var(--fucsia-claro)); color: #fff; border-bottom-right-radius: 5px; }
.glchat-msg.sys { align-self: center; background: var(--rosa-suave); color: var(--fucsia-osc); font-size: 12.5px; text-align: center; border-radius: 12px; padding: 7px 12px; max-width: 92%; }

/* tarjetas de producto */
.glchat-prod { align-self: flex-start; width: 82%; display: flex; gap: 10px; background: #fff; border: 1px solid var(--gris-claro); border-radius: 14px; padding: 8px; text-decoration: none; color: var(--negro); transition: box-shadow .2s, transform .2s; }
.glchat-prod:hover { box-shadow: var(--sombra); transform: translateY(-2px); }
.glchat-prod img { width: 62px; height: 78px; object-fit: cover; border-radius: 9px; flex: 0 0 62px; background: var(--gris-claro); }
.glchat-prod .pinfo { display: flex; flex-direction: column; justify-content: center; min-width: 0; gap: 2px; }
.glchat-prod .pmarca { font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--gris); }
.glchat-prod .pnom { font-size: 12.7px; font-weight: 500; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.glchat-prod .pprecio { font-weight: 700; color: var(--fucsia); font-size: 14px; }
.glchat-prod .pver { font-size: 11px; color: var(--fucsia); font-weight: 600; }

.glchat-video { align-self: flex-start; width: 82%; }
.glchat-video video { width: 100%; border-radius: 12px; background: #000; }

/* "escribiendo" */
.glchat-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--gris-claro); border-radius: 16px; border-bottom-left-radius: 5px; }
.glchat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--rosa); animation: glchatBlink 1.2s infinite; }
.glchat-typing span:nth-child(2) { animation-delay: .2s; }
.glchat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes glchatBlink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

.glchat-pie { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--gris-claro); background: #fff; }
.glchat-wa { display: block; text-align: center; font-size: 12px; color: var(--gris); margin-bottom: 8px; }
.glchat-wa a { color: #1faa53; font-weight: 600; }
.glchat-forma { display: flex; gap: 8px; align-items: flex-end; }
.glchat-forma textarea { flex: 1; resize: none; max-height: 96px; border: 1px solid var(--gris-claro); background: var(--crema); border-radius: 20px; padding: 10px 14px; font-family: inherit; font-size: 14px; color: var(--negro); line-height: 1.35; }
.glchat-forma textarea:focus { outline: none; border-color: var(--fucsia-claro); }
.glchat-forma .enviar { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; background: linear-gradient(135deg, var(--fucsia), var(--fucsia-claro)); color: #fff; font-size: 19px; display: grid; place-items: center; transition: transform .15s; }
.glchat-forma .enviar:hover { transform: scale(1.08); }
.glchat-forma .enviar:disabled { opacity: .5; transform: none; cursor: default; }
