/* Burbuja de chat — SocialChat365 (canal web). Colores del sitio: verde #087a54, azul #22558f, amarillo #f2c900. */
.scchat{--sc-verde:#087a54;--sc-verde-osc:#065f41;--sc-azul:#22558f;--sc-tinta:#14243a;--sc-suave:#667180;--sc-linea:#e2e7e8;--sc-fondo:#f9faf9;position:fixed;right:20px;bottom:20px;z-index:9000;font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Arial,sans-serif;color:var(--sc-tinta)}
.scchat *{box-sizing:border-box}
.scchat-boton{position:relative;display:grid;place-items:center;width:58px;height:58px;border:0;border-radius:50%;background:var(--sc-verde);color:#fff;box-shadow:0 10px 28px rgba(8,58,40,.35);cursor:pointer;transition:transform .2s,background .2s;margin-left:auto}
.scchat-boton:hover{background:var(--sc-verde-osc);transform:translateY(-2px)}
.scchat-boton:focus-visible,.scchat button:focus-visible,.scchat-campo:focus-visible{outline:3px solid #f2c900;outline-offset:2px}
.scchat-boton svg{width:26px;height:26px}
.scchat-ico-abrir{fill:#fff}
.scchat-ico-cerrar{display:none;fill:none;stroke:#fff;stroke-width:2.4;stroke-linecap:round}
.scchat[data-abierto="true"] .scchat-ico-abrir{display:none}
.scchat[data-abierto="true"] .scchat-ico-cerrar{display:block}
.scchat-boton:after{content:"";position:absolute;top:3px;right:3px;width:13px;height:13px;border-radius:50%;background:#f2c900;border:2px solid #fff}
.scchat.scchat-visto .scchat-boton:after,.scchat[data-abierto="true"] .scchat-boton:after{display:none}
.scchat-aviso{position:absolute;right:70px;bottom:12px;white-space:nowrap;background:#fff;color:var(--sc-tinta);border:1px solid var(--sc-linea);border-radius:18px;padding:7px 13px;font-size:13px;font-weight:650;box-shadow:0 6px 18px rgba(12,36,48,.12);animation:scchat-aparecer .4s 2s both}
.scchat.scchat-visto .scchat-aviso,.scchat[data-abierto="true"] .scchat-aviso{display:none}
.scchat-panel{position:absolute;right:0;bottom:72px;width:min(380px,calc(100vw - 40px));height:min(580px,calc(100vh - 120px));height:min(580px,calc(100dvh - 120px));display:flex;flex-direction:column;background:#fff;border:1px solid var(--sc-linea);border-radius:20px;box-shadow:0 24px 60px rgba(12,36,48,.22);overflow:hidden;animation:scchat-aparecer .2s ease-out}
.scchat-panel[hidden]{display:none}
.scchat-cabecera{display:flex;align-items:center;gap:11px;padding:14px 12px 14px 16px;background:linear-gradient(130deg,#173e65,#0c314f 60%,#086c53);color:#fff}
.scchat-avatar{flex-shrink:0;display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#f2c900;color:#0b2443;font-weight:850;font-size:13px;letter-spacing:.5px}
.scchat-titulos{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.3}
.scchat-titulos strong{font-size:15px}
.scchat-titulos span{font-size:12px;color:#d5e2ee;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.scchat-accion{flex-shrink:0;width:34px;height:34px;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:20px;line-height:1;cursor:pointer}
.scchat-accion:hover{background:rgba(255,255,255,.24)}
.scchat-mensajes{flex:1;overflow-y:auto;padding:16px 14px;display:flex;flex-direction:column;gap:9px;background:var(--sc-fondo);overscroll-behavior:contain}
.scchat-msg{max-width:86%;padding:10px 13px;border-radius:16px;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.scchat-msg-bot{align-self:flex-start;background:#fff;border:1px solid var(--sc-linea);border-bottom-left-radius:5px}
.scchat-msg-usuario{align-self:flex-end;background:var(--sc-azul);color:#fff;border-bottom-right-radius:5px}
.scchat-msg-error{background:#fdf1f0;border-color:#f3c9c6;color:#8a2a26}
.scchat-msg a{color:var(--sc-verde);text-decoration:underline}
.scchat-msg-usuario a{color:#fff}
.scchat-adjunto,.scchat-enlace{display:block;margin-top:9px;padding:8px 11px;border-radius:10px;background:#eef6f2;color:var(--sc-verde)!important;text-decoration:none!important;font-weight:700;font-size:13px}
.scchat-opciones{display:flex;flex-wrap:wrap;gap:6px;align-self:flex-start;max-width:100%}
.scchat-chip{border:1px solid #b8d8ca;background:#fff;color:var(--sc-verde);border-radius:18px;padding:6px 12px;font:inherit;font-size:13px;font-weight:650;cursor:pointer;text-align:left}
.scchat-chip:hover{background:#eef6f2}
.scchat-seccion{margin:6px 0 0;font-size:11px;font-weight:800;letter-spacing:1px;text-transform:uppercase;color:var(--sc-suave)}
.scchat-escribiendo{display:flex;gap:4px;align-items:center;padding:13px 15px}
.scchat-escribiendo i{width:7px;height:7px;border-radius:50%;background:#9aa8b4;animation:scchat-punto 1s infinite}
.scchat-escribiendo i:nth-child(2){animation-delay:.15s}
.scchat-escribiendo i:nth-child(3){animation-delay:.3s}
.scchat-form{display:flex;align-items:flex-end;gap:8px;padding:10px 12px;border-top:1px solid var(--sc-linea);background:#fff}
.scchat-campo{flex:1;resize:none;max-height:120px;border:1px solid #cfd9d4;border-radius:14px;padding:10px 12px;font:inherit;font-size:16px;line-height:1.4;color:var(--sc-tinta);background:var(--sc-fondo)}
.scchat-campo:focus{border-color:var(--sc-verde);outline:none}
.scchat-enviar{flex-shrink:0;display:grid;place-items:center;width:42px;height:42px;border:0;border-radius:50%;background:var(--sc-verde);cursor:pointer}
.scchat-enviar svg{width:19px;height:19px;fill:#fff}
.scchat-enviar:disabled{opacity:.5;cursor:wait}
.scchat-pie{margin:0;padding:0 12px 9px;background:#fff;font-size:10.5px;color:var(--sc-suave);text-align:center}
@keyframes scchat-aparecer{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes scchat-punto{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
@media(max-width:599px){
  .scchat{right:14px;bottom:14px}
  .scchat-aviso{display:none}
  .scchat[data-abierto="true"]{left:0;right:0;top:0;bottom:0}
  .scchat[data-abierto="true"] .scchat-boton{display:none}
  .scchat-panel{position:fixed;inset:0;width:100%;height:100%;border-radius:0;border:0}
}
@media(prefers-reduced-motion:reduce){.scchat *{animation:none!important;transition:none!important}}
