/* Chat de atención Speed Ex Cargo (web) */
.sxw-chat{--sxw-navy:#000c3e;--sxw-blue:#2329c8;--sxw-red:#e31b23;--sxw-bg:#f3f5fc;position:fixed;right:22px;bottom:22px;z-index:99990;font-family:Poppins,system-ui,sans-serif}
.sxw-chat *{box-sizing:border-box}
.sxw-fab{display:flex;align-items:center;gap:10px;height:60px;padding:0 22px 0 16px;border:0;border-radius:32px;background:var(--sxw-blue);color:#fff;font:600 16px/1 Poppins,system-ui,sans-serif;cursor:pointer;box-shadow:0 12px 30px rgba(35,41,200,.4);position:relative;transition:transform .15s}
.sxw-fab:hover{transform:translateY(-2px)}
.sxw-fab:focus-visible,.sxw-x:focus-visible,.sxw-send:focus-visible,.sxw-chip:focus-visible{outline:3px solid #ffb4b7;outline-offset:2px}
.sxw-fab svg{width:28px;height:28px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sxw-chat.is-open .sxw-fab{display:none}
.sxw-badge{position:absolute;top:-4px;right:-4px;min-width:24px;height:24px;padding:0 6px;border-radius:12px;background:var(--sxw-red);color:#fff;font-size:13px;line-height:24px;text-align:center;border:2px solid #fff}
.sxw-panel{width:380px;height:min(620px,calc(100vh - 44px));background:#fff;border-radius:22px;box-shadow:0 24px 70px rgba(0,12,62,.35);display:flex;flex-direction:column;overflow:hidden;animation:sxw-in .2s ease-out}
.sxw-panel[hidden]{display:none}
@keyframes sxw-in{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.sxw-head{display:flex;align-items:center;gap:12px;padding:14px 14px 14px 16px;background:var(--sxw-navy);color:#fff}
.sxw-head img{width:44px;height:44px;border-radius:50%;background:#fff;object-fit:contain;padding:4px;flex:none}
.sxw-head div{flex:1;min-width:0}
.sxw-head b{display:block;font-size:16px;line-height:1.2}
.sxw-head small{display:flex;align-items:center;gap:6px;font-size:12px;color:#c9d0ff}
.sxw-head small i{width:8px;height:8px;border-radius:50%;background:#2ecc71}
.sxw-x{width:38px;height:38px;border-radius:50%;border:0;background:rgba(255,255,255,.12);display:flex;align-items:center;justify-content:center;cursor:pointer;flex:none}
.sxw-x svg{width:20px;height:20px;stroke:#fff;stroke-width:2.4;stroke-linecap:round}
.sxw-list{flex:1;overflow-y:auto;padding:16px 14px;background:var(--sxw-bg);display:flex;flex-direction:column;gap:10px}
.sxw-msg{max-width:84%;padding:10px 13px;border-radius:16px;font-size:14px;line-height:1.45;word-wrap:break-word}
.sxw-msg p{margin:0}
.sxw-msg a{color:inherit;text-decoration:underline}
.sxw-msg small{display:block;font-size:11px;font-weight:600;color:var(--sxw-blue);margin-bottom:2px}
.sxw-msg time{display:block;font-size:10px;opacity:.6;margin-top:3px;text-align:right}
.sxw-msg--them{align-self:flex-start;background:#fff;color:#1d2340;border-bottom-left-radius:5px;box-shadow:0 2px 6px rgba(0,12,62,.06)}
.sxw-msg--me{align-self:flex-end;background:var(--sxw-blue);color:#fff;border-bottom-right-radius:5px}
.sxw-msg--sys{align-self:center;max-width:92%;background:#fff4f4;color:#a1141a;font-size:13px;text-align:center}
.sxw-typing{display:flex;gap:4px;padding:0 0 10px 18px;background:var(--sxw-bg)}
.sxw-typing[hidden]{display:none}
.sxw-typing span{width:8px;height:8px;border-radius:50%;background:#9aa3c7;animation:sxw-dot 1s infinite}
.sxw-typing span:nth-child(2){animation-delay:.15s}.sxw-typing span:nth-child(3){animation-delay:.3s}
@keyframes sxw-dot{0%,80%,100%{opacity:.3;transform:none}40%{opacity:1;transform:translateY(-3px)}}
.sxw-chips{display:flex;flex-wrap:wrap;gap:8px;padding:10px 12px 0;background:#fff}
.sxw-chips[hidden]{display:none}
.sxw-chip{border:1.5px solid #cfd4ef;background:#fff;color:var(--sxw-blue);border-radius:18px;padding:7px 12px;font:500 13px/1.2 Poppins,system-ui,sans-serif;cursor:pointer}
.sxw-chip:hover{background:#eef0ff}
.sxw-namerow{padding:10px 12px 0;background:#fff}
.sxw-namerow[hidden]{display:none}
.sxw-namerow input{width:100%;height:38px;border:1.5px solid #dfe3f2;border-radius:10px;padding:0 12px;font:14px Poppins,system-ui,sans-serif}
.sxw-form{display:flex;align-items:flex-end;gap:8px;padding:10px 12px;background:#fff}
.sxw-form[hidden]{display:none}
.sxw-form textarea{flex:1;resize:none;min-height:44px;max-height:120px;border:1.5px solid #dfe3f2;border-radius:14px;padding:11px 13px;font:14px/1.4 Poppins,system-ui,sans-serif;color:#1d2340;outline:none}
.sxw-form textarea:focus{border-color:var(--sxw-blue)}
.sxw-send{width:44px;height:44px;border-radius:50%;border:0;background:var(--sxw-red);display:flex;align-items:center;justify-content:center;cursor:pointer;flex:none}
.sxw-send:disabled{opacity:.5;cursor:default}
.sxw-send svg{width:22px;height:22px;fill:#fff}
.sxw-wa{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px 12px;background:#fff;color:#128c4a;font-size:12.5px;font-weight:600;text-decoration:none}
.sxw-wa svg{width:16px;height:16px;fill:none;stroke:#128c4a;stroke-width:1.8;stroke-linejoin:round}
@media (max-width:600px){
	.sxw-chat{right:14px;bottom:14px}
	.sxw-fab{width:60px;padding:0;justify-content:center}
	.sxw-fab__t{display:none}
	.sxw-chat.is-open{inset:0}
	.sxw-panel{width:100%;height:100%;border-radius:0}
	html.sxw-lock,html.sxw-lock body{overflow:hidden}
}
/* Blindaje contra estilos del tema (Astra/Elementor) */
.sxw-chat button{text-transform:none!important;letter-spacing:normal!important;min-width:0!important;min-height:0!important;line-height:1.2!important;box-sizing:border-box!important}
.sxw-chat .sxw-x{width:38px!important;height:38px!important;padding:0!important;border-radius:50%!important;background:rgba(255,255,255,.12)!important}
.sxw-chat .sxw-send{width:44px!important;height:44px!important;padding:0!important;border-radius:50%!important;background:#e31b23!important}
.sxw-chat .sxw-x svg,.sxw-chat .sxw-send svg{display:block!important;flex:none}
.sxw-chat .sxw-x svg{width:20px!important;height:20px!important;fill:none!important}
.sxw-chat .sxw-send svg{width:22px!important;height:22px!important}
.sxw-chat .sxw-chip{padding:7px 12px!important;border-radius:18px!important;background:#fff!important;color:#2329c8!important;font-size:13px!important;font-weight:500!important}
.sxw-chat .sxw-chip:hover{background:#eef0ff!important}
.sxw-chat .sxw-fab{background:#2329c8!important;border-radius:32px!important;color:#fff!important}
.sxw-chat textarea,.sxw-chat input{box-shadow:none!important;margin:0!important;text-transform:none!important}
.admin-bar .sxw-panel{height:min(620px,calc(100vh - 80px))}
.sxw-chat .sxw-chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}
.sxw-chat .sxw-chips::-webkit-scrollbar{display:none}
.sxw-chat .sxw-chip{white-space:nowrap;flex:none;display:inline-block!important;width:auto!important;margin:0!important}
.sxw-chat .sxw-msg{display:block!important}
.sxw-chat .sxw-msg small{display:block!important;margin:0 0 3px!important}
.sxw-chat .sxw-msg p{display:block!important;margin:0!important}
