#medusaa-assistant{--ma-ink:#081C57;--ma-accent:#0B35C9;--ma-cream:#fff;--ma-bottom:110px;color:var(--ma-ink);font-family:inherit;font-size:15px;line-height:1.5}
#medusaa-assistant *{box-sizing:border-box}
#medusaa-assistant [hidden]{display:none!important}
#medusaa-assistant button{font-family:inherit;font-size:14px;line-height:1.35;min-height:40px;height:auto;cursor:pointer;border:1px solid var(--ma-ink);border-radius:12px;padding:8px 13px;background:#fff;color:var(--ma-ink);box-shadow:none!important;transform:none!important;transition:none;--theme-button-shadow:none}
#medusaa-assistant button:after,#medusaa-assistant button:before{content:none!important}
#medusaa-assistant button:hover{color:var(--ma-accent)}
#medusaa-assistant button:disabled{opacity:.55;cursor:wait}
#medusaa-assistant :focus-visible{outline:3px solid var(--ma-accent);outline-offset:3px}
#medusaa-assistant .ma-launch{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:calc(var(--ma-bottom) + env(safe-area-inset-bottom));z-index:9990;display:block;width:clamp(68px,6vw,96px);height:auto;min-height:0;aspect-ratio:1;padding:0;border:0;border-radius:0;background:transparent;line-height:0;touch-action:manipulation}
#medusaa-assistant .ma-launch>img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;border-radius:0;pointer-events:none}
#medusaa-assistant .ma-launch>.ma-launch-default{display:none}
#medusaa-assistant .ma-launch>.ma-launch-active{display:block}
#medusaa-assistant .ma-launch[aria-expanded="true"]>.ma-launch-default{display:none}
#medusaa-assistant .ma-launch[aria-expanded="true"]>.ma-launch-active{display:block}
#medusaa-assistant .ma-launch:hover>.ma-launch-default{display:block}
#medusaa-assistant .ma-launch:hover>.ma-launch-active{display:none}
#medusaa-assistant .ma-whatsapp-launch{position:fixed;right:clamp(26px,calc(3vw - 13px),39px);bottom:calc(20px + clamp(58px,calc(6vw - 20px),84px) - 7px);z-index:9990;display:flex;align-items:center;justify-content:center;width:46px;height:46px;border:0;border-radius:0;background:transparent;color:#075E54;text-decoration:none;font-size:28px;line-height:1;box-shadow:none;transition:color .18s ease;pointer-events:auto}
#medusaa-assistant .ma-whatsapp-launch i{display:flex;align-items:center;justify-content:center;color:inherit;line-height:1}
#medusaa-assistant .ma-whatsapp-launch:hover{border-color:transparent;background:transparent;color:#075E54;box-shadow:none}
#medusaa-assistant .ma-bubble{--ma-bubble-right:calc(20px + clamp(58px,calc(6vw - 20px),84px) + 35px);position:fixed;right:var(--ma-bubble-right);bottom:calc(20px + clamp(29px,calc(3vw - 10px),42px) - 10px);z-index:9992;width:max-content;max-width:min(360px,calc(100vw - var(--ma-bubble-right) - 16px));padding:7px 12px;border:2px solid var(--ma-accent);border-radius:12px;background:#fff;color:var(--ma-accent);font-size:12px;line-height:1.25;white-space:pre-line;box-shadow:0 2px 7px rgba(8,28,87,.12);opacity:0;transform:translateY(50%) translateX(6px) scale(.98);transition:opacity .2s ease,transform .2s ease;pointer-events:none}
#medusaa-assistant .ma-bubble::before,#medusaa-assistant .ma-bubble::after{content:"";position:absolute;border:2px solid var(--ma-accent);border-radius:50%;background:#fff;pointer-events:none}
#medusaa-assistant .ma-bubble::before{right:-20px;top:calc(50% - 5px);width:12px;height:12px;transform:translateY(-50%)}
#medusaa-assistant .ma-bubble::after{right:-30px;top:calc(50% - 10px);width:8px;height:8px;transform:translateY(-50%)}
#medusaa-assistant .ma-bubble.ma-bubble-visible{opacity:1;transform:translateY(50%) translateX(0) scale(1)}
@media(min-width:1000px){
 #medusaa-assistant .ma-launch{right:20px;bottom:20px;width:clamp(58px,calc(6vw - 20px),84px)}
 #medusaa-assistant .ma-whatsapp-launch{right:20px;bottom:calc(20px + clamp(58px,calc(6vw - 20px),84px) - 7px);box-shadow:none}
}
#ma-panel{position:fixed;right:max(12px,env(safe-area-inset-right));bottom:calc(var(--ma-bottom) + env(safe-area-inset-bottom));z-index:9991;width:min(390px,calc(100vw - 24px));height:min(620px,calc(var(--ma-height,75dvh) - env(safe-area-inset-bottom)));max-height:calc(100dvh - 24px);display:flex;flex-direction:column;overflow:hidden;background:var(--ma-cream);border:0;border-radius:12px;text-align:left;box-shadow:0 8px 24px rgba(8,28,87,.16)}
#medusaa-assistant #ma-panel>.ma-header,#medusaa-assistant #ma-panel>.ma-log,#medusaa-assistant #ma-panel>.ma-choices,#medusaa-assistant #ma-panel>.ma-form,#medusaa-assistant #ma-panel>.ma-privacy{opacity:0;transform:translateY(8px);transition:opacity .24s ease,transform .32s cubic-bezier(.22,1,.36,1)}
#medusaa-assistant #ma-panel.ma-panel-open>.ma-header,#medusaa-assistant #ma-panel.ma-panel-open>.ma-log,#medusaa-assistant #ma-panel.ma-panel-open>.ma-choices,#medusaa-assistant #ma-panel.ma-panel-open>.ma-form,#medusaa-assistant #ma-panel.ma-panel-open>.ma-privacy{opacity:1;transform:translateY(0)}
#medusaa-assistant #ma-panel.ma-panel-open>.ma-header{transition-delay:.16s}
#medusaa-assistant #ma-panel.ma-panel-open>.ma-log{transition-delay:.21s}
#medusaa-assistant #ma-panel.ma-panel-open>.ma-choices{transition-delay:.25s}
#medusaa-assistant #ma-panel.ma-panel-open>.ma-form{transition-delay:.29s}
#medusaa-assistant #ma-panel.ma-panel-open>.ma-privacy{transition-delay:.33s}
@media(min-width:1000px){
 #medusaa-assistant #ma-panel{opacity:0;transform:translateY(12px) scale(.985);transform-origin:bottom right;pointer-events:none;transition:opacity .32s ease,transform .38s cubic-bezier(.22,1,.36,1)}
 #medusaa-assistant #ma-panel.ma-panel-open{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}
}
#medusaa-assistant .ma-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--ma-ink);flex-shrink:0}
#medusaa-assistant .ma-header strong,#medusaa-assistant .ma-header small{display:block}
#medusaa-assistant .ma-header small{font-size:11px}
#medusaa-assistant .ma-clear{font-size:11px;padding:6px 8px;margin-left:auto;flex-shrink:0}
#medusaa-assistant .ma-close{font-size:25px;border:0;padding:0;width:40px;min-width:40px;background:transparent}
#medusaa-assistant .ma-log{flex:1;min-height:50px;overflow:auto;overscroll-behavior:contain;padding:14px}
#medusaa-assistant .ma-message{white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 12px;padding:12px;border-radius:12px;background:#F1F5F9}
#medusaa-assistant .ma-message.ma-user{background:var(--ma-ink)}
#medusaa-assistant .ma-user{background:var(--ma-ink);color:#fff;margin-left:24px}
#medusaa-assistant .ma-choices{display:flex;flex-wrap:nowrap;gap:6px;padding:8px 12px;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;flex-shrink:0;overscroll-behavior-x:contain;scroll-padding-inline:12px;scrollbar-width:thin;scrollbar-color:var(--ma-accent) transparent;border-top:1px solid rgba(8,28,87,.15)}
#medusaa-assistant .ma-choices button{flex:0 0 auto;white-space:nowrap;font-size:12px;min-height:36px;padding:6px 10px;border-radius:12px}
#medusaa-assistant .ma-form{display:flex;gap:6px;margin:0;padding:8px 12px;flex-shrink:0}
#medusaa-assistant input{font:inherit;font-size:16px;min-width:0;width:100%;height:44px;margin:0;padding:8px 10px;background:#fff;color:var(--ma-ink);border:1px solid var(--ma-ink);border-radius:10px;box-shadow:none}
#medusaa-assistant .ma-form button{border-radius:12px}
#medusaa-assistant .ma-privacy{font-size:10px;line-height:1.4;margin:0;padding:0 12px 10px;flex-shrink:0}
#medusaa-assistant .ma-product{display:flex;gap:10px;margin-top:12px;padding-top:10px;border-top:1px solid #ddd;text-decoration:none;color:var(--ma-ink);white-space:normal}
#medusaa-assistant .ma-product>span{min-width:0}
#medusaa-assistant .ma-product img{width:52px;height:52px;object-fit:contain;flex-shrink:0;border-radius:12px}
#medusaa-assistant .ma-product strong,#medusaa-assistant .ma-product span span,#medusaa-assistant .ma-product small{display:block}
#medusaa-assistant .ma-product strong{font-size:13px}
#medusaa-assistant .ma-product small,#medusaa-assistant .ma-note{font-size:11px}
#medusaa-assistant .ma-note{display:block;margin-top:12px}
#medusaa-assistant .ma-link{display:block;margin-top:10px;text-decoration:underline;color:var(--ma-accent)}
#medusaa-assistant .ma-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#medusaa-assistant .ma-mascot,#medusaa-assistant .ma-tentacles{display:none}
/* La ventana usa el azul y blanco del sitio; no altera el dock ni el lanzador. */
#medusaa-assistant #ma-panel{--ma-ink:#081C57;--ma-accent:#0B35C9;--ma-cream:#fff;color:var(--ma-ink);background:#fff;border-color:var(--ma-ink)}
#medusaa-assistant #ma-panel button{box-shadow:0 2px 6px rgba(8,28,87,.12)!important;transition:background .18s ease,color .18s ease,border-color .18s ease,box-shadow .18s ease}
#medusaa-assistant #ma-panel button:hover{box-shadow:0 3px 8px rgba(8,28,87,.16)!important}
#medusaa-assistant #ma-panel .ma-header{border-bottom:0;gap:8px}
#medusaa-assistant #ma-panel .ma-header strong{color:var(--ma-accent)}
#medusaa-assistant #ma-panel .ma-header small{color:var(--ma-ink)}
#medusaa-assistant #ma-panel .ma-close{display:flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;min-height:40px;padding:0;border:1px solid var(--ma-ink);border-radius:12px;background:#fff;color:var(--ma-ink);line-height:1}
#medusaa-assistant #ma-panel .ma-clear{background:#fff;border-color:var(--ma-ink);color:var(--ma-ink)}
#medusaa-assistant #ma-panel .ma-clear:hover{background:var(--ma-accent);border-color:var(--ma-accent);color:#fff}
#medusaa-assistant #ma-panel .ma-header{--ma-header-control:34px}
#medusaa-assistant #ma-panel .ma-header strong{line-height:20px}
#medusaa-assistant #ma-panel .ma-header small{line-height:14px}
#medusaa-assistant #ma-panel .ma-clear{height:var(--ma-header-control);min-height:var(--ma-header-control);padding:4px 8px}
#medusaa-assistant #ma-panel .ma-close{flex-basis:var(--ma-header-control);width:var(--ma-header-control);min-width:var(--ma-header-control);height:var(--ma-header-control);min-height:var(--ma-header-control);font-size:22px}
#medusaa-assistant #ma-panel .ma-whatsapp{display:flex;align-items:center;justify-content:center;flex:0 0 var(--ma-header-control);width:var(--ma-header-control);height:var(--ma-header-control);border:1px solid #075E54;border-radius:12px;background:#DCF8C6;color:#075E54;text-decoration:none;box-shadow:none;font-size:18px;line-height:1}
#medusaa-assistant #ma-panel .ma-whatsapp i{display:flex;color:inherit;line-height:1}
#medusaa-assistant #ma-panel .ma-whatsapp:hover{background:#075E54;color:#fff;border-color:#075E54}
#medusaa-assistant #ma-panel .ma-close:hover{background:var(--ma-accent);color:#fff;border-color:var(--ma-accent)}
#medusaa-assistant #ma-panel .ma-header{gap:6px;padding-inline:12px}
#medusaa-assistant #ma-panel .ma-header>div{min-width:0;flex:1}
#medusaa-assistant #ma-panel .ma-clear{white-space:nowrap;padding-inline:6px}
@media(max-width:360px){#medusaa-assistant #ma-panel .ma-header{gap:4px;padding-inline:8px}#medusaa-assistant #ma-panel .ma-header strong{font-size:13px}#medusaa-assistant #ma-panel .ma-header small{font-size:10px}}
#medusaa-assistant .ma-thoughts{display:none;pointer-events:none}
#medusaa-assistant #ma-panel .ma-choices{border-top-color:rgba(8,28,87,.15)}
#medusaa-assistant #ma-panel .ma-product strong{color:var(--ma-accent)}
#medusaa-assistant #ma-panel input::placeholder{color:var(--ma-ink);opacity:.65}
#medusaa-assistant #ma-panel .ma-form input{border-radius:12px}
#medusaa-assistant #ma-panel .ma-form input:focus,#medusaa-assistant #ma-panel .ma-form input:focus-visible{outline:none!important;box-shadow:0 0 0 2px rgba(11,53,201,.12)!important;border:2px solid var(--ma-accent);padding:7px 9px}
#medusaa-assistant #ma-panel .ma-form button{border-radius:12px;white-space:nowrap;flex-shrink:0}
#medusaa-assistant #ma-panel .ma-form button{border-color:var(--ma-accent);color:var(--ma-accent);background:#fff}
#medusaa-assistant #ma-panel .ma-form button:hover{background:var(--ma-accent);border-color:var(--ma-accent);color:#fff}
@media(max-width:999px){
 #medusaa-assistant .ma-launch{right:max(12px,env(safe-area-inset-right));bottom:calc(var(--ma-bottom) + env(safe-area-inset-bottom) - 20px);width:58px;min-width:58px;height:58px;min-height:0;padding:0;border:0;border-radius:0;background:transparent}
 #medusaa-assistant .ma-bubble{--ma-bubble-right:calc(max(12px,env(safe-area-inset-right)) + 58px + 35px);bottom:calc(var(--ma-bottom) + env(safe-area-inset-bottom) - 6px);max-width:min(360px,calc(100vw - var(--ma-bubble-right) - 12px));font-size:11px;transform:translateY(calc(50% + 5px)) translateX(6px) scale(.98)}
 #medusaa-assistant .ma-bubble.ma-bubble-visible{transform:translateY(calc(50% + 5px)) translateX(0) scale(1)}
 #medusaa-assistant .ma-whatsapp-launch{display:none!important}
 #medusaa-assistant .ma-thoughts,#medusaa-assistant .ma-tentacles{display:none!important}
  #medusaa-assistant #ma-panel{position:fixed;top:max(8px,env(safe-area-inset-top));right:0;bottom:max(8px,env(safe-area-inset-bottom));left:auto;width:min(380px,calc(100vw - 28px));height:auto;max-height:none;border:0;border-radius:12px 0 0 12px;transform:translateX(102%);transition:transform .42s cubic-bezier(.22,1,.36,1);overscroll-behavior:contain}
 #medusaa-assistant #ma-panel.ma-panel-open{transform:translateX(0)}
 #medusaa-assistant #ma-panel.ma-panel-exit{transform:translateX(102%)}
 #medusaa-assistant[data-dock-anchored="true"]{position:absolute;inset:0;pointer-events:none;overflow:visible}
 #medusaa-assistant[data-dock-anchored="true"][data-mobile-dock="true"] .ma-launch{position:fixed;left:auto;right:max(12px,env(safe-area-inset-right));bottom:calc(var(--ma-bottom) + env(safe-area-inset-bottom) - 10px);pointer-events:auto;touch-action:manipulation}
 #medusaa-assistant[data-dock-anchored="true"]:has(.ma-launch[aria-expanded="true"]) .ma-thoughts{display:block;position:absolute;left:calc(77% - var(--ma-mascot-width)/2 - 58px);bottom:calc(100% + 20px);width:48px;height:64px;z-index:var(--ma-front-z,9990)}
 #medusaa-assistant .ma-thoughts i{position:absolute;display:block;border:2px solid var(--ma-ink);background:#fff;border-radius:50%}
 #medusaa-assistant .ma-thoughts i:nth-child(1){width:24px;height:24px;left:0;top:0}
 #medusaa-assistant .ma-thoughts i:nth-child(2){width:16px;height:16px;left:16px;top:29px}
 #medusaa-assistant .ma-thoughts i:nth-child(3){width:10px;height:10px;left:34px;top:50px}
 #medusaa-assistant[data-dock-anchored="true"][data-mobile-dock="true"] .ma-tentacles{position:absolute;left:0;bottom:var(--ma-tentacle-offset);width:100%}
 #medusaa-assistant[data-mobile-dock="true"] .ma-tentacles{display:block;position:fixed;left:var(--ma-dock-left);bottom:var(--ma-tentacle-bottom);width:var(--ma-dock-width);height:var(--ma-tentacle-height);overflow:hidden;pointer-events:none;z-index:var(--ma-front-z,9990)}
 #medusaa-assistant .ma-tentacles svg{position:absolute;top:0;width:36%;height:auto;aspect-ratio:1388/358}
 #medusaa-assistant .ma-tentacles svg:first-child{left:13.5%}
 #medusaa-assistant .ma-tentacles svg:last-child{left:51%}
 #medusaa-assistant[data-mobile-dock="true"] #ma-panel{z-index:var(--ma-panel-z,9991)}
 #medusaa-assistant[data-dock-anchored="true"] #ma-panel{position:fixed;right:0;top:max(8px,env(safe-area-inset-top));bottom:max(8px,env(safe-area-inset-bottom));height:auto;max-height:none}
 #medusaa-assistant[data-dock-anchored="true"] .ma-log{flex-shrink:0;flex-grow:1;flex-basis:90px}
 #medusaa-assistant[data-keyboard="true"] #ma-panel{position:fixed;top:var(--ma-edit-top);bottom:auto;height:var(--ma-edit-height);max-height:var(--ma-edit-height);overflow:hidden;pointer-events:auto}
 #medusaa-assistant[data-keyboard="true"] .ma-log{flex:1 1 0;min-height:0}
 #medusaa-assistant[data-keyboard="true"] .ma-choices,#medusaa-assistant[data-keyboard="true"] .ma-privacy{display:none}
}
/* Con el chat cerrado, los controles viven dentro del dock. Sus coordenadas
   deben ser locales al contenedor, tanto en PWA como en navegador móvil. */
#medusaa-assistant[data-dock-anchored="true"][data-mobile-dock="true"] {
    z-index: var(--ma-front-z, 99991) !important;
}
#medusaa-assistant[data-dock-anchored="true"][data-mobile-dock="true"] .ma-launch {
    position: absolute !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    bottom: 66px !important;
}
@media(prefers-reduced-motion:reduce){#medusaa-assistant .ma-bubble,#medusaa-assistant #ma-panel,#medusaa-assistant #ma-panel>.ma-header,#medusaa-assistant #ma-panel>.ma-log,#medusaa-assistant #ma-panel>.ma-choices,#medusaa-assistant #ma-panel>.ma-form,#medusaa-assistant #ma-panel>.ma-privacy{transition:none}}
@media(max-height:520px){#medusaa-assistant .ma-choices{max-height:70px}#medusaa-assistant .ma-header{padding:6px 12px}#medusaa-assistant .ma-privacy{display:none}}
