/* Asistente Aldo · floating "Ayuda" bot + bottom-sheet chat. Aldo cream #FAF7F2, black, gold. */
.ahb { --ahb-gold: #C9A24A; --ahb-cream: #FAF7F2; --ahb-avoid: 0px; font-family: var(--font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif); }
.ahb-fab { position: fixed; z-index: 210; right: calc(12px + env(safe-area-inset-right, 0px));
  bottom: calc(max(var(--ahb-avoid), env(safe-area-inset-bottom, 0px)) + 14px);
  display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: bottom .25s ease; }
.ahb.ahb-raised .ahb-fab { bottom: calc(var(--ahb-avoid) + 12px); }
.ahb.is-open .ahb-fab, .ahb.ahb-covered .ahb-fab { opacity: 0; pointer-events: none; }
.ahb.ahb-innav .ahb-fab { display: none; }   /* feed: the bot is the 5th tab of the bottom nav */
/* bottom-nav tab icon (same 28px box the WhatsApp mark used; nothing spills onto the neighbours) */
.aldo-nav [data-nav="ayuda"] .ahb-navic { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #000; box-shadow: 0 0 0 1.5px #C9A24A; }
.aldo-nav [data-nav="ayuda"] .ahb-navic .ahb-svg { width: 24px; height: 24px; overflow: hidden; }
/* attention: gentle gold ring, re-triggered every ~20 s by JS (not continuous) */
.ahb-glow { animation: ahb-ring 2.4s ease-out 1 !important; }
@keyframes ahb-ring { 0% { box-shadow: 0 0 0 0 rgba(201,162,74,.75), 0 0 0 1.5px #C9A24A; } 70% { box-shadow: 0 0 0 10px rgba(201,162,74,0), 0 0 0 1.5px #C9A24A; } 100% { box-shadow: 0 0 0 0 rgba(201,162,74,0), 0 0 0 1.5px #C9A24A; } }
.ahb-bot.ahb-glow { animation: ahb-ring 2.4s ease-out 1, ahb-bob 3.2s ease-in-out infinite !important; }
.ahb-hint { position: fixed; z-index: 215; max-width: 70vw; padding: 8px 12px; border-radius: 14px 14px 4px 14px; background: #000; color: #FAF7F2; border: 1.5px solid #C9A24A;
  font: 700 13.5px/1.2 var(--font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif); box-shadow: 0 6px 18px rgba(0,0,0,.25); cursor: pointer; animation: ahb-pop .35s ease-out; }
.ahb-hint[hidden] { display: none; }
@keyframes ahb-pop { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }
.ahb-bot { width: 56px; height: 56px; border-radius: 50%; background: #000; border: 2px solid var(--ahb-gold); display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.28), 0 0 0 3px rgba(250,247,242,.85); animation: ahb-bob 3.2s ease-in-out infinite; }
.ahb-svg { width: 42px; height: 42px; overflow: visible; }
.ahb-eyes { transform-origin: 32px 30.5px; animation: ahb-blink 4.6s infinite; }
.ahb-ant { transform-origin: 32px 7.5px; animation: ahb-glow 2.4s ease-in-out infinite; }
.ahb-arm { transform-origin: 44px 50px; animation: ahb-wave 6s ease-in-out infinite; }
.ahb-tag { position: relative; padding: 6px 11px; border-radius: 999px; background: var(--ahb-cream); color: #000; font: 700 13px/1 inherit; font-family: inherit;
  letter-spacing: .02em; border: 1.5px solid var(--ahb-gold); box-shadow: 0 3px 10px rgba(0,0,0,.18); animation: ahb-bob 3.2s ease-in-out infinite; animation-delay: -.25s; }
.ahb-tag::after { content: ""; position: absolute; right: -6px; top: 50%; margin-top: -4px; border: 4px solid transparent; border-left: 6px solid var(--ahb-gold); border-right: 0; }
.ahb-fab:focus-visible .ahb-bot { outline: 3px solid var(--ahb-gold); outline-offset: 3px; }
@keyframes ahb-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes ahb-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes ahb-glow { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes ahb-wave { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-22deg); } 88% { transform: rotate(8deg); } 92% { transform: rotate(-18deg); } 96% { transform: rotate(4deg); } }

.ahb-sheet { position: fixed; inset: 0; z-index: 290; display: flex; align-items: flex-end; justify-content: center; }
.ahb-sheet[hidden] { display: none; }
.ahb-bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); animation: ahb-fade .2s ease; }
.ahb-card { position: relative; width: 100%; max-width: 480px; height: min(78vh, 640px); height: min(78dvh, 640px); display: flex; flex-direction: column;
  background: var(--ahb-cream); color: #000; border-radius: 20px 20px 0 0; border-top: 3px solid var(--ahb-gold); overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px); animation: ahb-up .25s ease; box-shadow: 0 -10px 30px rgba(0,0,0,.25); }
.ahb-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: #000; color: var(--ahb-cream); }
.ahb-head b { display: block; font-size: 16px; } .ahb-head small { display: block; font-size: 11.5px; color: #CDBB8E; }
.ahb-head > span:nth-child(2) { flex: 1; min-width: 0; }
.ahb-av { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--ahb-gold); display: grid; place-items: center; flex: none; }
.ahb-av .ahb-svg { width: 30px; height: 30px; }
.ahb-hwa { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; border: 1px solid #25D366; border-radius: 999px; background: rgba(37,211,102,.12); color: #E8FBEF; font: 700 12px/1 inherit; font-family: inherit; cursor: pointer; flex: none; }
.ahb-chip.ahb-buy { background: #000; color: #FAF7F2; border-color: #C9A24A; }
.ahb-chip.ahb-wa { display: inline-flex; align-items: center; gap: 5px; }
.ahb-humanrow { background: none !important; border: 0 !important; padding: 0 !important; }
.ahb-human { border: 1.5px solid #C9A24A; background: #FFFDF9; color: #000; border-radius: 999px; padding: 8px 12px; font: 600 13.5px inherit; font-family: inherit; cursor: pointer; }
.ahb-x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(250,247,242,.12); color: var(--ahb-cream); font-size: 26px; line-height: 1; cursor: pointer; }
.ahb-log { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 14px 12px 6px; display: flex; flex-direction: column; gap: 8px; }
.ahb-msg { max-width: 86%; padding: 10px 12px; border-radius: 16px; font-size: 15px; line-height: 1.4; word-wrap: break-word; }
.ahb-a { align-self: flex-start; background: #FFFDF9; border: 1px solid #E6DCCB; border-bottom-left-radius: 5px; }
.ahb-u { align-self: flex-end; background: #000; color: var(--ahb-cream); border-bottom-right-radius: 5px; }
.ahb-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ahb-links a { display: inline-block; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--ahb-gold); color: #000; text-decoration: none; font-weight: 600; font-size: 13.5px; background: var(--ahb-cream); }
.ahb-typing { display: flex; gap: 4px; padding: 13px 14px; }
.ahb-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ahb-gold); animation: ahb-dot 1s infinite; }
.ahb-typing i:nth-child(2) { animation-delay: .15s; } .ahb-typing i:nth-child(3) { animation-delay: .3s; }
.ahb-contact label { display: block; font-size: 14px; margin-bottom: 8px; }
.ahb-ctrow { display: flex; gap: 6px; }
.ahb-ctrow input { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid #DDD0BB; border-radius: 10px; font: 16px inherit; font-family: inherit; background: #fff; }
.ahb-ctrow button { border: 0; border-radius: 10px; background: #000; color: var(--ahb-cream); font-weight: 700; padding: 0 12px; font-family: inherit; }
.ahb-skip { margin-top: 6px; border: 0; background: none; color: #6B5B3A; text-decoration: underline; padding: 4px 0; font: 13px inherit; font-family: inherit; }
.ahb-err { display: block; color: #A12A1E; font-size: 13px; font-style: normal; margin-top: 4px; }
.ahb-chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; scrollbar-width: none; border-top: 1px solid #F1EBE0; }
.ahb-chips::-webkit-scrollbar { display: none; }
.ahb-chip { flex: none; padding: 8px 12px; border-radius: 999px; border: 1.5px solid #DDD0BB; background: #FFFDF9; color: #000; font: 600 13.5px inherit; font-family: inherit;
  text-decoration: none; white-space: nowrap; cursor: pointer; }
.ahb-chip.ahb-wa { border-color: #25D366; }
.ahb-form { display: flex; gap: 8px; padding: 6px 12px 4px; }
.ahb-form input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1.5px solid #DDD0BB; border-radius: 999px; background: #fff; font-size: 16px; font-family: inherit; color: #000; }
.ahb-form input:focus { outline: none; border-color: var(--ahb-gold); }
.ahb-send { width: 46px; height: 46px; flex: none; border: 0; border-radius: 50%; background: #000; color: var(--ahb-gold); display: grid; place-items: center; cursor: pointer; }
.ahb-fine { margin: 0; padding: 2px 14px 8px; font-size: 11px; color: #7A6A4A; text-align: center; }
html.ahb-lock, html.ahb-lock body { overflow: hidden; }
@keyframes ahb-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes ahb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ahb-dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) {
  .ahb-bot, .ahb-tag, .ahb-eyes, .ahb-ant, .ahb-arm, .ahb-card, .ahb-bg, .ahb-typing i { animation: none !important; }
  .ahb-fab { transition: none; }
  .ahb-glow, .ahb-bot.ahb-glow, .ahb-hint { animation: none !important; }
  .ahb-hint { display: none !important; }
  .aldo-nav [data-nav="ayuda"] .ahb-eyes, .aldo-nav [data-nav="ayuda"] .ahb-ant, .aldo-nav [data-nav="ayuda"] .ahb-arm { animation: none !important; }
}
@media print { .ahb { display: none !important; } }
/* Joel 11-oct-2026 (v2): "connected/online" icon — a BLUE glow ring (Blue-plan blue) that rotates and breathes
   lighter ↔ darker continuously, plus a tiny blue online dot. Robot body unchanged. Off with prefers-reduced-motion. */
.aldo-nav [data-nav="ayuda"] .ahb-navic, .aldo-foot .af-bot .af-c { position: relative; isolation: isolate; box-shadow: 0 0 0 1.5px #1E5BFF; }
.aldo-nav [data-nav="ayuda"] .ahb-navic::before, .aldo-foot .af-bot .af-c::before, .ahb-fab .ahb-bot::before { content: ""; position: absolute; inset: -3.5px; border-radius: 50%; pointer-events: none; z-index: -1;
  background: conic-gradient(from 0deg, #1E5BFF, #8FB2FF, #DCE7FF, #8FB2FF, #1E5BFF, #0B2E99, #1E5BFF);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  animation: ahb-spin 3.2s linear infinite, ahb-breathe 2.6s ease-in-out infinite; }
.aldo-nav [data-nav="ayuda"] .ahb-navic::after, .aldo-foot .af-bot .af-c::after, .ahb-fab .ahb-bot::after { content: ""; position: absolute; right: -2px; bottom: -1px; width: 7px; height: 7px; border-radius: 50%;
  background: #3D7BFF; box-shadow: 0 0 0 1.5px #000, 0 0 6px #8FB2FF; animation: ahb-online 2.6s ease-in-out infinite; }
.aldo-foot .af-bot .af-c { overflow: visible; }
.ahb-fab .ahb-bot { position: relative; isolation: isolate; border-color: #1E5BFF; }
.ahb-fab .ahb-bot::after { right: 1px; bottom: 2px; width: 10px; height: 10px; }
@keyframes ahb-spin { to { transform: rotate(360deg); } }
@keyframes ahb-breathe { 0%, 100% { filter: brightness(.75) drop-shadow(0 0 2px rgba(30,91,255,.5)); } 50% { filter: brightness(1.35) drop-shadow(0 0 6px rgba(143,178,255,.9)); } }
@keyframes ahb-online { 0%, 100% { background: #1E5BFF; } 50% { background: #8FB2FF; } }
.aldo-nav [data-nav="ayuda"] .ahb-navic.ahb-glow { animation: ahb-ring-blue 2.4s ease-out 1 !important; }
@keyframes ahb-ring-blue { 0% { box-shadow: 0 0 0 0 rgba(30,91,255,.75), 0 0 0 1.5px #1E5BFF; } 70% { box-shadow: 0 0 0 11px rgba(143,178,255,0), 0 0 0 1.5px #1E5BFF; } 100% { box-shadow: 0 0 0 0 rgba(143,178,255,0), 0 0 0 1.5px #1E5BFF; } }
@media (prefers-reduced-motion: reduce) {
  .aldo-nav [data-nav="ayuda"] .ahb-navic::before, .aldo-foot .af-bot .af-c::before, .aldo-nav [data-nav="ayuda"] .ahb-navic::after, .aldo-foot .af-bot .af-c::after, .ahb-fab .ahb-bot::before, .ahb-fab .ahb-bot::after { animation: none !important; }
}
