:root{--sereci-chat-blue:var(--sereci-chat-primary,#EF760C);--sereci-chat-blue-dark:var(--sereci-chat-primary-dark,#C85C00);--sereci-chat-bg:var(--sereci-surface,#fff);--sereci-chat-text:var(--sereci-text,#17212b);--sereci-chat-muted:var(--sereci-muted,#66727f);--sereci-chat-border:var(--sereci-border,#e3e8ed);--sereci-chat-shadow:0 20px 60px rgba(10,35,60,.20)}
.sereci-chat-shell{background:var(--sereci-chat-bg);border:1px solid var(--sereci-chat-border);border-radius:18px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,.08);max-width:760px;color:var(--sereci-chat-text);font-family:inherit}
.sereci-chat-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;background:linear-gradient(135deg,#f8fbfd,#f3f7fa);border-bottom:1px solid var(--sereci-chat-border)}
.sereci-chat-head-main{display:flex;align-items:center;gap:10px;min-width:0}.sereci-chat-head-main>div{min-width:0}.sereci-chat-head strong{display:block;font-size:16px;line-height:1.2;color:var(--sereci-chat-text)}.sereci-chat-head span{display:block;font-size:11px;color:var(--sereci-chat-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sereci-chat-avatar{width:38px;height:38px;min-width:38px;border-radius:13px;display:grid!important;place-items:center;background:linear-gradient(135deg,var(--sereci-chat-blue),var(--sereci-chat-blue-dark));box-shadow:0 6px 16px rgba(23,105,170,.24)}.sereci-chat-avatar svg,.sereci-chat-launcher-icon svg{width:24px;height:24px;fill:#fff}.sereci-chat-custom-icon{width:100%;height:100%;object-fit:contain;border-radius:inherit}.sereci-chat-avatar:has(.sereci-chat-custom-icon),.sereci-chat-launcher-icon:has(.sereci-chat-custom-icon){background:#fff;padding:5px}.sereci-chat-avatar .sereci-chat-icon-detail,.sereci-chat-launcher-icon .sereci-chat-icon-detail{fill:none;stroke:var(--sereci-chat-blue);stroke-width:3.2;stroke-linecap:round}
.sereci-chat-head-actions{display:flex;align-items:center;gap:6px;flex:none}.sereci-chat-online{display:flex!important;align-items:center;gap:5px;padding:5px 8px;border-radius:999px;background:#e8f7ed!important;color:#14733c!important;font-weight:700;font-size:10px!important}.sereci-chat-online i{width:6px;height:6px;border-radius:50%;background:#28a85d;box-shadow:0 0 0 3px rgba(40,168,93,.12)}
.sereci-chat-head-btn{width:31px;height:31px;border:0;border-radius:9px;background:#fff;color:#4d5964;display:grid;place-items:center;cursor:pointer;font-size:22px;line-height:1;box-shadow:0 1px 4px rgba(0,0,0,.08);transition:.18s ease}.sereci-chat-head-btn:hover{background:#eef4f8;color:var(--sereci-chat-blue);transform:translateY(-1px)}.sereci-chat-close:hover{background:#fff1f1;color:#b42318}
.sereci-chat-messages{height:300px;overflow:auto;padding:16px;background:linear-gradient(#fbfcfd,#f8fafb);scrollbar-width:thin}.sereci-chat-msg{max-width:84%;padding:10px 12px;border-radius:14px;margin:0 0 10px;line-height:1.45;white-space:pre-wrap;font-size:14px}.sereci-chat-msg.bot{background:#fff;border:1px solid var(--sereci-chat-border);border-top-left-radius:5px;box-shadow:0 2px 8px rgba(20,40,60,.04)}.sereci-chat-msg.user{margin-left:auto;background:linear-gradient(135deg,var(--sereci-chat-blue),var(--sereci-chat-blue-dark));color:#fff;border-bottom-right-radius:5px}
.sereci-chat-actions{display:flex;flex-wrap:wrap;gap:7px;margin:-3px 0 14px}.sereci-chat-action,.sereci-chat-chips button{border:1px solid #cdd7df;background:#fff;border-radius:999px;padding:7px 11px;cursor:pointer;text-decoration:none;color:#25313c;font-size:12px;transition:.16s ease}.sereci-chat-action:hover,.sereci-chat-chips button:hover{border-color:var(--sereci-chat-blue);color:var(--sereci-chat-blue);background:#f5faff}.sereci-chat-chips{display:flex;gap:6px;flex-wrap:wrap;padding:8px 12px 0;background:#fff}.sereci-chat-shell.has-conversation .sereci-chat-chips{display:none}.sereci-chat-chips .is-human{border-color:color-mix(in srgb,var(--sereci-chat-blue) 45%,#cdd7df);font-weight:700}
.sereci-chat-form{display:flex;gap:8px;padding:9px 12px 8px;background:#fff}.sereci-chat-form input{flex:1;min-width:0;min-height:44px;border:1px solid #c8d2db;border-radius:12px;padding:9px 12px;background:#fff;color:#17212b;box-shadow:none}.sereci-chat-form input:focus{outline:none;border-color:var(--sereci-chat-blue);box-shadow:0 0 0 3px rgba(23,105,170,.10)}.sereci-chat-form button{border:0;border-radius:12px;padding:0 15px;min-height:44px;background:linear-gradient(135deg,var(--sereci-chat-blue),var(--sereci-chat-blue-dark));color:#fff;font-weight:700;cursor:pointer;display:flex;align-items:center;gap:7px;box-shadow:0 6px 14px rgba(23,105,170,.20)}.sereci-chat-form button svg{width:17px;height:17px;fill:currentColor}.sereci-chat-form.busy{opacity:.65}.sereci-chat-privacy{margin:0;padding:0 14px 12px;color:#7a858f;font-size:10.5px;background:#fff}
.sereci-chat-supervisor-layout{display:grid;grid-template-columns:260px minmax(0,760px);gap:18px;align-items:start}.sereci-chat-context{background:#fff;border:1px solid #dcdcde;border-radius:14px;padding:14px}.sereci-chat-context h2{margin-top:0;font-size:16px}.sereci-chat-context label{display:block;margin:0 0 12px;font-weight:600}.sereci-chat-context input,.sereci-chat-context select{width:100%;margin-top:5px}.sereci-chat-context p{font-size:12px;color:#646970}.context-fixed{padding:9px 10px;background:#f6f7f7;border-radius:8px;margin-bottom:12px}.context-fixed small,.context-fixed strong{display:block}
/* Floating widget: deliberately above Elementor popups, sticky headers and most third-party overlays. */
.sereci-chat-floating-wrap{position:fixed;right:max(18px,env(safe-area-inset-right));left:auto;bottom:max(18px,env(safe-area-inset-bottom));z-index:var(--sereci-chat-zindex,2147483000)!important;width:min(var(--sereci-chat-width,420px),calc(100vw - 30px));max-width:var(--sereci-chat-width,420px);isolation:isolate;pointer-events:none}
.sereci-chat-floating-wrap.is-left{left:max(18px,env(safe-area-inset-left));right:auto}.sereci-chat-floating-wrap.is-left .sereci-chat-launcher{left:0;right:auto}.sereci-chat-floating-wrap.is-left .sereci-chat-shell.floating{transform-origin:bottom left}.sereci-chat-floating-wrap *{box-sizing:border-box}.sereci-chat-floating-wrap .sereci-chat-shell,.sereci-chat-floating-wrap .sereci-chat-launcher{pointer-events:auto}
.sereci-chat-shell.floating{position:relative;right:auto;bottom:auto;z-index:2;width:100%;max-width:none;box-shadow:var(--sereci-chat-shadow);transform-origin:bottom right;transition:opacity .2s ease,transform .2s ease,visibility .2s ease}.sereci-chat-shell.floating .sereci-chat-messages{height:min(280px,40vh)}
.sereci-chat-floating-wrap.is-collapsed .sereci-chat-shell.floating{opacity:0;visibility:hidden;transform:translateY(14px) scale(.96);pointer-events:none}.sereci-chat-floating-wrap:not(.is-collapsed) .sereci-chat-launcher{opacity:0;visibility:hidden;transform:translateY(8px) scale(.92);pointer-events:none}
.sereci-chat-launcher{position:absolute;right:0;bottom:0;min-height:58px;border:0;border-radius:18px;padding:8px 13px 8px 8px;background:linear-gradient(135deg,var(--sereci-chat-blue),var(--sereci-chat-blue-dark));color:#fff;display:flex;align-items:center;gap:10px;box-shadow:0 14px 36px rgba(11,66,111,.34);cursor:pointer;transition:opacity .2s ease,transform .2s ease,visibility .2s ease;max-width:230px;text-align:left}.sereci-chat-launcher:hover{transform:translateY(-2px);box-shadow:0 17px 40px rgba(11,66,111,.40)}.sereci-chat-launcher-icon{width:43px;height:43px;min-width:43px;border-radius:14px;display:grid;place-items:center;background:rgba(255,255,255,.16);backdrop-filter:blur(6px)}.sereci-chat-launcher-icon svg{width:27px;height:27px}.sereci-chat-launcher-label strong{display:block;font-size:13px;line-height:1.15}.sereci-chat-launcher-label small{display:block;font-size:10px;opacity:.82;margin-top:3px}.sereci-chat-launcher-badge{position:absolute;right:-3px;top:-3px;width:13px;height:13px;border-radius:50%;background:#31c36a;border:3px solid #fff;box-shadow:0 2px 6px rgba(0,0,0,.18)}
.sereci-chat-floating-wrap.is-collapsed .sereci-chat-launcher{opacity:1;visibility:visible;transform:none;pointer-events:auto}
.sereci-chat-floating-wrap.is-dismissed{display:none!important;visibility:hidden!important;pointer-events:none!important}
@media(max-width:800px){.sereci-chat-supervisor-layout{grid-template-columns:1fr}.sereci-chat-shell{max-width:none}.sereci-chat-messages{height:330px}.sereci-chat-floating-wrap{right:max(10px,env(safe-area-inset-right));left:auto;bottom:max(10px,env(safe-area-inset-bottom));width:calc(100vw - 20px);max-width:none}.sereci-chat-floating-wrap.is-left{left:max(10px,env(safe-area-inset-left));right:auto}.sereci-chat-shell.floating{border-radius:16px}.sereci-chat-shell.floating .sereci-chat-messages{height:min(260px,38vh)}.sereci-chat-launcher{right:0;border-radius:50%;width:58px;height:58px;min-height:58px;padding:7px;justify-content:center}.sereci-chat-launcher-label{display:none}.sereci-chat-launcher-icon{width:44px;height:44px;background:transparent}.sereci-chat-head{padding:11px}.sereci-chat-online{display:none!important}.sereci-chat-form button span{display:none}.sereci-chat-form button{padding:0 14px}}
@media(max-height:620px){.sereci-chat-shell.floating .sereci-chat-messages{height:230px}.sereci-chat-privacy{display:none}.sereci-chat-chips{max-height:82px;overflow:auto}}
@media(prefers-reduced-motion:reduce){.sereci-chat-shell.floating,.sereci-chat-launcher,.sereci-chat-head-btn{transition:none!important}}


/* 1.4.4 · Chat controls normalized against theme CSS */
.sereci-chat-shell,.sereci-chat-shell *{box-sizing:border-box}
.sereci-chat-shell.floating .sereci-chat-messages{height:clamp(180px,30vh,260px)}
.sereci-chat-form{align-items:stretch!important;gap:8px!important}
.sereci-chat-form input[type=text]{height:48px!important;min-height:48px!important;max-height:48px!important;margin:0!important;padding:0 13px!important;line-height:1.2!important;border-radius:12px!important;font:inherit!important;font-size:14px!important;box-sizing:border-box!important}
.sereci-chat-form button[type=submit]{height:48px!important;min-height:48px!important;max-height:48px!important;margin:0!important;padding:0 18px!important;line-height:1!important;border-radius:12px!important;align-self:stretch!important;box-sizing:border-box!important;white-space:nowrap!important}
.sereci-chat-form button[type=submit] span{line-height:1!important}
.sereci-chat-actions,.sereci-chat-chips{align-items:center}
.sereci-chat-action,.sereci-chat-chips button{min-height:36px!important;height:36px;padding:0 12px!important;margin:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;box-sizing:border-box!important;white-space:nowrap}
.sereci-chat-head-btn{width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;padding:0!important;margin:0!important;line-height:1!important;display:grid!important;place-items:center!important;box-sizing:border-box!important}
.sereci-chat-online{min-height:34px;display:inline-flex!important;align-items:center!important;box-sizing:border-box}
@media(max-width:800px){.sereci-chat-form input[type=text],.sereci-chat-form button[type=submit]{height:46px!important;min-height:46px!important;max-height:46px!important}.sereci-chat-shell.floating .sereci-chat-messages{height:clamp(170px,28vh,230px)}}


/* 1.5.3 · Respuestas oficiales largas y listas legibles */
.sereci-chat-msg.bot{white-space:pre-wrap!important;overflow-wrap:anywhere}
.sereci-chat-messages{scroll-padding-bottom:18px}
.sereci-chat-actions{position:relative;z-index:1}

/* RC29 · Accesibilidad y legibilidad del asistente */
.sereci-chat-head span{font-size:12px}.sereci-chat-online{font-size:11px!important}.sereci-chat-action,.sereci-chat-chips button{font-size:13px}.sereci-chat-privacy{font-size:12px;line-height:1.45}.sereci-chat-launcher-label small{font-size:11px}.sereci-chat-head-btn:focus-visible,.sereci-chat-launcher:focus-visible,.sereci-chat-action:focus-visible,.sereci-chat-chips button:focus-visible,.sereci-chat-form button:focus-visible{outline:3px solid color-mix(in srgb,var(--sereci-chat-blue) 30%,transparent);outline-offset:2px}
