/* Asistente Laserdental: copia de las reglas del de PUEDO (css/site.css), 22/11/2026 */
#pw-chat, #pw-chat-btn {
    --primary: #4a2c1b; --primary-dark: #2d1a0e; --secondary: #c4a88a; --cream: #faf6f0; --white: #ffffff;
    --dark: #2d1a0e; --gray: #8a7a6a; --gray-light: #ede7e0;
    --shadow-hover: 0 16px 48px rgba(74, 44, 27, 0.20); --radius-sm: 10px; --font: 'Inter', 'Segoe UI', sans-serif;
}
#pw-chat *, #pw-chat-btn * { box-sizing: border-box; }
#pw-chat p { margin: 0 0 4.8px; }
#pw-chat button, #pw-chat input { font-family: var(--font); line-height: normal; }

/* ===== ASISTENTE (buscador de la web) ===== */
#pw-chat-btn {
    position: fixed; bottom: 32px; left: 32px; z-index: 1001;
    width: 72px; height: 72px; border-radius: 50%; border: none;
    background: var(--primary); color: var(--white); font-size: 41.6px;
    box-shadow: 0 8px 24px rgba(74, 44, 27, 0.35); cursor: pointer;
}
#pw-chat {
    display: none; position: fixed; bottom: 96px; left: 16px; z-index: 1002;
    width: min(360px, calc(100vw - 32px)); height: 460px; max-height: 70vh;
    background: var(--white); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover); flex-direction: column; overflow: hidden;
    font-family: var(--font); font-size: 14.4px;
}
#pw-chat.open { display: flex; }
.pw-chat-head {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--primary); color: var(--white); padding: 12.8px 16px;
}
.pw-chat-close { background: none; border: none; color: var(--white); font-size: 24px; cursor: pointer; }
.pw-chat-body { flex: 1; overflow-y: auto; padding: 12.8px; background: var(--cream); }
.pw-msg { padding: 9.6px 12.8px; border-radius: 12px; margin-bottom: 9.6px; line-height: 1.5; color: var(--dark); }
.pw-bot { background: var(--white); }
.pw-user { background: var(--gray-light); margin-left: 32px; }
.pw-hit { border-top: 1px solid var(--gray-light); padding-top: 8px; margin-top: 8px; }
.pw-hit strong { color: var(--primary); display: block; margin-bottom: 3.2px; }
.pw-hit p { margin: 0 0 4.8px; }
.pw-hit a { color: var(--primary); font-weight: 600; }
.pw-note { font-size: 12px; color: var(--gray); margin-top: 8px; }

.pw-bot { position: relative; margin-left: 57.6px; }
.pw-robot { position: absolute; left: -49.6px; top: 3.2px; width: 41.6px; height: 41.6px; border-radius: 50%; background: var(--primary); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 20.8px; }
.pw-fuentes { margin: 4.8px 0 0; padding-left: 17.6px; }
.pw-fuentes li { margin-bottom: 3.2px; }
.pw-fuentes a { color: var(--primary); text-decoration: underline; }
.pw-chat-form { display: flex; gap: 6.4px; padding: 9.6px; border-top: 1px solid var(--gray-light); }
.pw-chat-form input { flex: 1; padding: 8px 11.2px; border: 1px solid var(--gray-light); border-radius: 20px; font-size: 14.4px; }
.pw-chat-form button { background: var(--primary); color: var(--white); border: none; border-radius: 20px; padding: 8px 14.4px; cursor: pointer; }


/* ===== ROBOT PASA (animado; misma figura que la App PASA) ===== */
.pasa-bot { position: relative; display: block; aspect-ratio: 2 / 3; }
.pasa-bot img, .pasa-bot svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pasa-bot .pasa-base { -webkit-mask: url(#pasa-bodymask); mask: url(#pasa-bodymask); }
.pasa-bot .pasa-arm { clip-path: polygon(5% 30%, 25% 30%, 32% 27%, 40% 30%, 34% 44%, 27% 46%, 14% 43%, 5% 39%); transform-origin: 35% 31%; animation: pasa-gesture 5s ease-in-out infinite; }
.pasa-bot .pasa-eyes { transform-origin: 512px 240px; animation: pasa-blink 5s infinite; }
.pasa-bot .pasa-mouth { transform-origin: 515px 286px; }
.pasa-bot .pasa-chest { opacity: 0; }
.pasa-bot.talking .pasa-arm { animation: pasa-gesture 2.4s ease-in-out infinite; }
.pasa-bot.talking .pasa-mouth { animation: pasa-speak .23s ease-in-out infinite alternate; }
.pasa-bot.talking .pasa-chest { animation: pasa-glow .8s infinite alternate; }
.pasa-bot--mini { width: 24px; height: 36px; }
#pw-chat-btn .pasa-bot--mini { width: 44px; height: 66px; margin: 3px auto; }
.pw-robot .pasa-bot--mini { width: 24px; height: 36px; }
@keyframes pasa-blink { 0%, 44%, 48%, 100% { transform: scaleY(1); } 46% { transform: scaleY(.08); } }
@keyframes pasa-gesture { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(8deg); } 65% { transform: rotate(3deg); } }
@keyframes pasa-speak { from { transform: scaleY(.3); } to { transform: scaleY(1.7); } }
@keyframes pasa-glow { to { opacity: .7; } }
@media (prefers-reduced-motion: reduce) {
    .pasa-bot .pasa-arm, .pasa-bot .pasa-eyes, .pasa-bot .pasa-mouth, .pasa-bot .pasa-chest { animation: none !important; }
}

/* Micrófono del asistente */
.pw-chat-mic { background: var(--white) !important; color: var(--primary) !important; border: 1px solid var(--gray-light) !important; padding: 8px 10.4px !important; }
.pw-chat-mic[hidden] { display: none !important; }
.pw-chat-mic.escuchando { background: #c0392b !important; color: var(--white) !important; border-color: #c0392b !important; }
.pw-chat-voz { background: transparent; border: none; color: var(--white); opacity: 0.7; cursor: pointer; font-size: 16px; padding: 0 6.4px; }
.pw-chat-voz.activa { opacity: 1; }

/* Aviso para encender el altavoz (se oculta al encenderlo) */
.pw-aviso-voz {
    display: flex; align-items: center; gap: 8px; width: 100%; border: none; cursor: pointer;
    background: var(--secondary); color: var(--primary-dark); font-family: var(--font);
    font-size: 13.12px; font-weight: 600; padding: 7.2px 16px; text-align: left;
}
.pw-aviso-voz[hidden] { display: none; }

/* Robot PASA grande, sin círculo, como en la App (210 px de alto) */
#pw-chat-btn {
    width: 140px; height: 210px; left: 16px; bottom: 8px; padding: 0;
    border-radius: 0; background: transparent; box-shadow: none;
    filter: drop-shadow(0 8px 14px rgba(74, 44, 27, 0.35));
}
#pw-chat-btn .pasa-bot--mini { width: 140px; height: 210px; margin: 0; }
#pw-chat-btn:focus-visible { outline: 3px solid var(--secondary); outline-offset: 4px; border-radius: 12px; }
#pw-chat { left: 160px; bottom: 16px; }
@media (max-width: 767px) {
    #pw-chat { left: 16px; bottom: 225px; max-height: calc(100vh - 245px); max-height: calc(100dvh - 245px); }
}

/* Al hablar: la luz del pecho parpadea con brillo y el brazo saluda más */
.pasa-bot.talking .pasa-chest { animation: pasa-luz .45s steps(1, end) infinite; filter: drop-shadow(0 0 18px #7efaff); }
.pasa-bot.talking .pasa-arm { animation: pasa-saludo 1.1s ease-in-out infinite; }
@keyframes pasa-luz { 0% { opacity: 1; } 50% { opacity: .15; } }

/* Cartel "Pensando…" con puntos que se mueven */
.pw-pensando { color: var(--gray); font-style: italic; }
.pw-puntos i { font-style: normal; animation: pw-punto 1.2s infinite; }
.pw-puntos i:nth-child(2) { animation-delay: .2s; }
.pw-puntos i:nth-child(3) { animation-delay: .4s; }
@keyframes pw-punto { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }

/* Móvil: elegir texto o audio; con audio, la respuesta escrita queda plegada */
.pw-modo-botones { display: flex; gap: 8px; margin-top: 8px; }
.pw-modo-botones button {
    flex: 1; border: 1px solid var(--primary); background: var(--white); color: var(--primary);
    border-radius: 20px; padding: 8px; font-weight: 700; font-family: var(--font); cursor: pointer;
}
.pw-modo-botones button[data-modo="audio"] { background: var(--primary); color: var(--white); }
.pw-ver-texto { border: none; background: none; padding: 0; color: var(--primary); font-family: var(--font); font-size: 13.6px; cursor: pointer; text-align: left; }
.pw-solo-audio > div, .pw-solo-audio > .pw-note { display: none; }
@media (max-width: 767px) { .pw-aviso-voz { display: none; } }
@keyframes pasa-saludo { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(16deg); } 60% { transform: rotate(4deg); } 80% { transform: rotate(12deg); } }

