/* Botsito · personaje 3D libre + globo de diálogo independiente */
.botsito-launcher{position:fixed;z-index:120;left:22px;bottom:20px;display:flex;align-items:center;gap:10px;min-height:54px;padding:6px 17px 6px 7px;border:1px solid rgba(100,166,255,.45);border-radius:99px;background:linear-gradient(120deg,#fff,#f5f9ff);color:#1b3478;box-shadow:0 12px 35px rgba(11,31,93,.2);font-size:10px;font-weight:700;cursor:pointer;transition:transform .22s,box-shadow .22s}
.botsito-launcher:hover{transform:translateY(-3px);box-shadow:0 17px 40px rgba(11,31,93,.28)}
.launcher-avatar{display:grid;place-items:center;width:40px;height:40px;overflow:hidden;border-radius:50%;background:radial-gradient(circle at 50% 35%,#e9fbff,#bfdcff 68%,#4b6fed);box-shadow:inset 0 0 0 1px #fff}
.launcher-avatar img{width:58px;height:65px;object-fit:contain;object-position:center bottom;margin-top:4px}
.botsito-launcher b{color:#225ddd}.launcher-arrow{margin-left:3px;color:#209ddc;font-size:17px}

/* La capa oscurece suavemente; el recorte spotlight deja el objetivo nítido. */
.botsito-overlay{position:fixed;inset:0;z-index:1000;display:none;pointer-events:none}
.botsito-overlay.is-active{display:block}
.botsito-spotlight{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.botsito-focus-ring{position:fixed;left:0;top:0;width:0;height:0;border:2px solid #72eaff;border-radius:18px;box-shadow:0 0 0 5px rgba(78,207,255,.18),0 0 30px 7px rgba(56,211,255,.5),inset 0 0 18px rgba(91,224,255,.10);opacity:0;transition:top .32s ease,left .32s ease,width .32s ease,height .32s ease,opacity .2s;pointer-events:none}
.botsito-focus-ring.is-visible{opacity:1}

/* El panel es transparente y ocupa la pantalla solo como capa de posicionamiento. */
.botsito-panel{position:fixed;inset:0;z-index:1100;display:block;background:transparent;border:0;border-radius:0;box-shadow:none;color:#fff;outline:none;pointer-events:none}
.botsito-panel[hidden]{display:none!important}
.botsito-panel:before{content:none}

/* Botsito: cuerpo completo, libre, sin tarjeta o marco alrededor. */
.botsito-character{position:fixed;left:clamp(8px,2.4vw,42px);bottom:clamp(66px,8vh,92px);display:flex;align-items:flex-end;justify-content:center;width:clamp(190px,23vw,330px);height:clamp(270px,56vh,485px);isolation:isolate;pointer-events:none;z-index:2}
.character-glow{position:absolute;z-index:-1;left:7%;right:7%;bottom:1%;height:30%;border-radius:50%;background:radial-gradient(ellipse,rgba(39,194,255,.30),rgba(44,117,235,.10) 48%,transparent 73%);filter:blur(17px)}
.botsito-image{position:relative;display:block;width:100%;height:100%;max-height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 13px 18px rgba(0,0,0,.22)) drop-shadow(0 0 13px rgba(63,176,255,.24));transform-origin:50% 88%;animation:botsito-float 4s ease-in-out infinite;transition:opacity .16s ease,filter .25s,transform .25s}
.botsito-character.is-changing .botsito-image{opacity:.48;transform:translateY(7px) scale(.98)}
.botsito-character[data-expression="wave"] .botsito-image,.botsito-character[data-expression="bye"] .botsito-image{animation:botsito-float 3.6s ease-in-out infinite,botsito-wave-tilt 1.8s ease-in-out 1}
.botsito-character[data-expression="talk"] .botsito-image,.botsito-character[data-expression="present"] .botsito-image{animation:botsito-float 3.6s ease-in-out infinite,botsito-talk 1.8s ease-in-out infinite}
.botsito-character[data-expression="point"] .botsito-image{animation:botsito-float 3.8s ease-in-out infinite,botsito-point 1.2s ease-in-out 1}
.botsito-character[data-expression="think"] .botsito-image{animation:botsito-think 2.8s ease-in-out infinite}
.botsito-character[data-expression="celebrate"] .botsito-image{animation:botsito-celebrate .9s ease-in-out 2,botsito-float 4s ease-in-out infinite}
.botsito-emotion-mark{position:absolute;top:6%;right:8%;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;color:#fff5a9;font-size:25px;text-shadow:0 0 16px #34caff;opacity:0;transform:scale(.6) rotate(-15deg);transition:opacity .2s,transform .25s;pointer-events:none}
.botsito-character[data-expression="think"] .botsito-emotion-mark{content:'?';opacity:1;color:#48dcff;transform:scale(1) rotate(0)}
.botsito-character[data-expression="celebrate"] .botsito-emotion-mark,.botsito-character[data-expression="wave"] .botsito-emotion-mark,.botsito-character[data-expression="bye"] .botsito-emotion-mark{opacity:1;transform:scale(1) rotate(0)}

/* Globo de diálogo: la única tarjeta visible de la experiencia. */
.botsito-bubble{position:fixed;left:clamp(245px,25vw,410px);right:clamp(18px,4vw,62px);bottom:clamp(112px,14vh,150px);width:min(740px,calc(100vw - clamp(245px,25vw,410px) - clamp(18px,4vw,62px)));max-height:min(54vh,390px);overflow-y:auto;overscroll-behavior:contain;padding:19px 22px 18px;border:2px solid rgba(101,221,255,.96);border-radius:26px;background:linear-gradient(145deg,rgba(255,255,255,.99),rgba(237,248,255,.985) 58%,rgba(220,240,255,.99));box-shadow:0 18px 48px rgba(0,8,40,.30),0 0 0 4px rgba(57,197,255,.13),0 0 28px rgba(47,193,255,.42);color:#14265e;pointer-events:auto;animation:bubble-in .32s cubic-bezier(.2,.75,.2,1) both;z-index:4}
.botsito-bubble:before{content:'';position:absolute;left:-14px;top:53%;width:24px;height:24px;background:#f6fbff;border-left:2px solid #65ddff;border-bottom:2px solid #65ddff;transform:translateY(-50%) rotate(45deg);border-bottom-left-radius:4px}
.botsito-bubble-head{position:relative;display:flex;align-items:center;gap:12px;min-height:36px;margin-bottom:11px}
.botsito-bubble-brand{display:flex;align-items:center;gap:8px;flex:0 0 auto;min-width:120px;color:#fff}
.bubble-brand-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;border:1px solid rgba(170,245,255,.9);background:linear-gradient(145deg,#29caff,#175ee2);box-shadow:0 0 16px rgba(0,167,255,.43);font-family:var(--display);font-size:17px;font-weight:900;color:white}
.botsito-bubble-brand strong,.botsito-bubble-brand small{display:block}.botsito-bubble-brand strong{font-family:var(--display);font-size:16px;line-height:1;color:#143b91}.botsito-bubble-brand small{margin-top:3px;color:#3387c8;font-size:7px;font-weight:900;letter-spacing:.16em}
.botsito-stage-meta{display:flex;align-items:center;gap:9px;margin-left:auto;margin-right:38px;color:#31558c;font-size:8px;font-weight:900;white-space:nowrap}
.botsito-dots{display:flex;align-items:center;gap:4px}.botsito-dots span{display:block;width:7px;height:7px;border-radius:50%;background:#c3d6ec;border:1px solid #91b8e2;transition:transform .2s,background .2s,box-shadow .2s}.botsito-dots span.active{background:#28c8f5;border-color:#7aeaff;box-shadow:0 0 9px #42dfff;transform:scale(1.32)}.botsito-dots span.done{background:#238be8;border-color:#69baff}
.botsito-close{position:absolute;right:0;top:50%;display:grid;place-items:center;width:31px;height:31px;border:1px solid #8bcfff;border-radius:50%;background:linear-gradient(145deg,#168ef0,#254ed4);color:#fff;font-size:22px;line-height:1;cursor:pointer;box-shadow:0 4px 12px rgba(21,105,211,.22);transform:translateY(-50%);transition:background .2s,transform .2s}
.botsito-close:hover{background:#0b62c8;transform:translateY(-50%) rotate(90deg)}
.botsito-copy{position:relative;z-index:1}
.botsito-step{margin-bottom:5px;color:#138fcf;font-size:7px;font-weight:900;letter-spacing:.18em}
.botsito-utterance{display:inline-flex;align-items:center;min-height:22px;margin-bottom:4px;color:#0c8fc8;font-family:var(--display);font-size:14px;font-weight:800}
.botsito-copy h2{margin:0 0 7px;color:#12265e;font-family:var(--display);font-size:clamp(21px,2.1vw,28px);line-height:1.12;letter-spacing:-.025em}
.botsito-copy p{margin:0;color:#354975;font-size:clamp(11px,.95vw,13px);line-height:1.55}
.botsito-benefit{display:flex;align-items:flex-start;gap:9px;margin-top:11px;padding:9px 11px;border:1px solid #b8ddff;border-radius:14px;background:linear-gradient(100deg,#e6f5ff,#e8efff);color:#24477b;font-size:9px;line-height:1.45}
.botsito-benefit[hidden]{display:none}
.benefit-symbol{display:grid;place-items:center;flex-shrink:0;width:25px;height:25px;border-radius:50%;background:linear-gradient(145deg,#1b9ff1,#415ce0);color:#fff;font-size:14px;box-shadow:0 4px 10px rgba(34,115,220,.23)}
.botsito-benefit strong{color:#145eb4}

/* Barra compacta de navegación: independiente del personaje y del globo. */
.botsito-controls{position:fixed;left:clamp(245px,25vw,410px);right:clamp(18px,4vw,62px);bottom:18px;width:min(740px,calc(100vw - clamp(245px,25vw,410px) - clamp(18px,4vw,62px)));display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:52px;padding:6px 9px 6px 11px;border:1px solid rgba(117,199,255,.58);border-radius:999px;background:linear-gradient(110deg,rgba(5,22,65,.92),rgba(12,43,106,.92));box-shadow:0 10px 28px rgba(0,7,35,.25),0 0 18px rgba(34,155,255,.14);backdrop-filter:blur(12px);pointer-events:auto;z-index:5}
.control-text{flex:0 0 auto;border:1px solid rgba(114,178,238,.5);border-radius:99px;background:rgba(6,19,58,.35);color:#d9ebff;padding:8px 12px;font-size:8px;font-weight:800;cursor:pointer;transition:background .2s,border-color .2s}.control-text:hover{background:rgba(44,101,185,.45);border-color:#54c7ff}
.control-actions{display:flex;align-items:center;gap:8px}
.control-secondary,.control-primary{min-width:95px;padding:9px 13px;border-radius:99px;font-size:8px;font-weight:900;cursor:pointer;transition:transform .2s,box-shadow .2s,background .2s}
.control-secondary{border:1px solid rgba(142,188,238,.6);background:rgba(255,255,255,.08);color:#d7e9ff}.control-secondary:disabled{opacity:.35;cursor:not-allowed}.control-primary{border:1px solid #63eaff;background:linear-gradient(100deg,#0788ee,#1473ef 60%,#1bb9ee);color:#fff;box-shadow:0 7px 22px rgba(0,144,255,.28)}.control-primary:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 10px 28px rgba(0,144,255,.42)}.control-primary:disabled{opacity:.45;cursor:not-allowed}.control-primary span{margin-left:5px;color:#c6faff;font-size:13px}
.botsito-progress-count{min-width:67px;text-align:center;color:#b7d4f5;font-size:7px;font-weight:900;letter-spacing:.08em;white-space:nowrap}
.botsito-panel .botsito-benefit strong{color:#145eb4}
.botsito-panel.is-final .botsito-benefit{background:#e5fff7;border-color:#b8f0dc;color:#1c765d}
.tour-active .botsito-launcher{opacity:0;pointer-events:none;transform:translateY(12px)}
.tour-highlight{position:relative!important;scroll-margin-top:112px!important}

/* En el primer paso la burbuja queda debajo del encabezado; en las secciones, arriba a la derecha. */
.botsito-panel.tour-bubble-bottom .botsito-bubble{top:auto;bottom:clamp(112px,14vh,150px)}
.botsito-panel.tour-bubble-bottom .botsito-controls{bottom:18px}
.botsito-panel.tour-bubble-top .botsito-bubble{top:clamp(94px,12vh,132px);bottom:auto}
.botsito-panel.tour-bubble-top .botsito-controls{bottom:18px}
.botsito-panel.is-welcome .botsito-bubble{max-height:min(58vh,430px)}
.botsito-panel.is-welcome .botsito-copy h2{font-size:clamp(23px,2.3vw,31px)}
.botsito-panel.is-final .botsito-utterance{color:#0a9a79}

/* Estados del personaje: cada expresión carga una pose 3D real, no solo una rotación CSS. */
@keyframes botsito-float{0%,100%{translate:0 0}50%{translate:0 -7px}}
@keyframes botsito-wave-tilt{0%,100%{rotate:0deg}35%{rotate:-1.2deg}68%{rotate:1.2deg}}
@keyframes botsito-talk{0%,100%{translate:0 0}50%{translate:0 -5px}}
@keyframes botsito-point{0%,100%{translate:0 0}45%{translate:5px -7px}70%{translate:2px -3px}}
@keyframes botsito-think{0%,100%{translate:0 0;rotate:0}50%{translate:-3px -5px;rotate:-1.3deg}}
@keyframes botsito-celebrate{0%,100%{translate:0 0;rotate:0}25%{translate:0 -10px;rotate:-2deg}55%{translate:0 -3px;rotate:2deg}80%{translate:0 -8px;rotate:-1deg}}
@keyframes bubble-in{from{opacity:0;translate:0 12px;scale:.985}to{opacity:1;translate:0 0;scale:1}}

@media(max-width:900px){
  .botsito-character{left:4px;width:clamp(170px,24vw,230px);height:clamp(245px,47vh,360px);bottom:65px}
  .botsito-bubble,.botsito-controls{left:clamp(205px,27vw,270px);right:16px;width:auto}
  .botsito-bubble{padding:16px 17px 15px;max-height:min(50vh,330px)}
  .botsito-bubble-brand{min-width:100px}.botsito-stage-meta{gap:6px;margin-right:34px}.botsito-dots{gap:3px}.botsito-dots span{width:6px;height:6px}
}
@media(max-width:700px){
  .botsito-character{left:0;bottom:64px;width:clamp(116px,25vw,160px);height:clamp(185px,30vh,245px)}
  .botsito-bubble,.botsito-controls{left:clamp(116px,26vw,172px);right:10px;width:auto}
  .botsito-bubble{padding:12px 12px 11px;border-radius:19px;max-height:42vh}
  .botsito-bubble:before{left:-10px;width:17px;height:17px}
  .botsito-bubble-head{gap:5px;min-height:28px;margin-bottom:7px}
  .bubble-brand-icon{width:27px;height:27px;font-size:14px}.botsito-bubble-brand{gap:5px;min-width:72px}.botsito-bubble-brand strong{font-size:13px}.botsito-bubble-brand small{font-size:6px}
  .botsito-stage-meta{display:flex;flex-direction:column;align-items:flex-end;gap:3px;margin-right:30px;font-size:7px}.botsito-dots{gap:2px}.botsito-dots span{width:5px;height:5px}.botsito-close{width:25px;height:25px;font-size:18px}
  .botsito-step{font-size:6px;margin-bottom:3px}.botsito-utterance{font-size:11px;min-height:16px;margin-bottom:2px}.botsito-copy h2{font-size:clamp(14px,3.3vw,19px);margin-bottom:5px}.botsito-copy p{font-size:10px;line-height:1.42}.botsito-benefit{gap:6px;margin-top:7px;padding:7px;font-size:7px}.benefit-symbol{width:20px;height:20px;font-size:11px}
  .botsito-controls{bottom:9px;min-height:42px;padding:4px 6px;border-radius:99px;gap:4px}.control-text{padding:7px 8px;font-size:7px}.control-actions{gap:4px}.control-secondary,.control-primary{min-width:0;padding:7px 8px;font-size:7px}.botsito-progress-count{min-width:48px;font-size:6px}
  .botsito-panel.tour-bubble-top .botsito-bubble{top:78px}.botsito-panel.tour-bubble-bottom .botsito-bubble{bottom:70px}
}
@media(max-width:430px){
  .botsito-character{width:108px;height:175px;bottom:61px;left:-3px}
  .botsito-bubble,.botsito-controls{left:103px;right:7px}
  .botsito-bubble{padding:10px 10px 9px;max-height:40vh}
  .botsito-bubble-brand{min-width:66px}.botsito-bubble-brand strong{font-size:12px}.botsito-stage-meta{font-size:6px;margin-right:27px}.botsito-close{width:23px;height:23px}
  .botsito-copy h2{font-size:15px}.botsito-copy p{font-size:9px}.botsito-benefit{font-size:7.5px}.botsito-controls{min-height:40px}.control-text{font-size:6.5px;padding:6px 7px}.control-secondary,.control-primary{font-size:6.5px;padding:7px 6px}.botsito-progress-count{display:none}
}
@media(prefers-reduced-motion:reduce){.botsito-image,.botsito-emotion-mark,.botsito-bubble{animation:none!important;transition:none!important}.botsito-focus-ring{transition:none!important}}
