/**
 * CoreChat frontend widget styles.
 */
.corechat-toggle{position:fixed;right:24px;bottom:24px;z-index:99998;width:58px;height:58px;border-radius:50%;border:0;cursor:pointer;background:linear-gradient(135deg,#2271b1,#135e96);color:#fff;font-size:24px;box-shadow:0 6px 20px rgba(0,0,0,.28);display:flex;align-items:center;justify-content:center;transition:transform .15s ease}
.corechat-toggle:hover{transform:scale(1.06)}
.corechat-toggle span{pointer-events:none}
.corechat-toggle.pulse::before{content:"";position:absolute;inset:0;border-radius:50%;background:rgba(34,113,177,.55);animation:corechat-pulse-ring 1.8s ease-out infinite;z-index:-1}
@keyframes corechat-pulse-ring{0%{transform:scale(1);opacity:.7}100%{transform:scale(1.9);opacity:0}}
.corechat-badge{position:absolute;top:-2px;right:-2px;background:#d63638;color:#fff;font-size:11px;font-weight:700;line-height:1;min-width:18px;height:18px;border-radius:9px;display:flex;align-items:center;justify-content:center;padding:0 4px;box-shadow:0 0 0 2px #fff;animation:corechat-badge-bounce 1.6s ease-in-out infinite}
@keyframes corechat-badge-bounce{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
.corechat-panel{position:fixed;right:24px;bottom:96px;z-index:99999;width:380px;max-width:calc(100vw - 48px);height:600px;max-height:calc(100vh - 110px);background:#fff;border-radius:16px;box-shadow:0 16px 48px rgba(0,0,0,.3);display:flex;flex-direction:column;overflow:hidden;opacity:0;visibility:hidden;transform:translateY(16px) scale(.97);transform-origin:bottom right;transition:opacity .22s ease,transform .22s ease,visibility .22s;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}
.corechat-panel.open{opacity:1;visibility:visible;transform:translateY(0) scale(1)}
.corechat-head{background:linear-gradient(135deg,#1d2327,#2c3338);color:#fff;padding:14px 16px;display:flex;align-items:center;gap:10px}
.corechat-head strong{display:block;font-size:14px;line-height:1.3}
.corechat-head small{display:block;font-size:11px;color:#8ce99a;line-height:1.3}
.corechat-head small::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:#8ce99a;margin-right:4px}
.corechat-avatar{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.14);font-size:16px;flex-shrink:0}
.corechat-body{flex:1;overflow-y:auto;padding:14px;background:#f6f7f7}
.corechat-row{display:flex;align-items:flex-end;gap:6px;margin-bottom:10px}
.corechat-row.user{justify-content:flex-end}
.corechat-avatar-sm{width:22px;height:22px;font-size:12px;background:#e7e9ea;flex-shrink:0}
.corechat-msg{max-width:78%;padding:9px 12px;border-radius:14px;font-size:13px;line-height:1.5;word-wrap:break-word}
.corechat-msg.bot{background:#fff;border:1px solid #e5e5e5;border-bottom-left-radius:4px}
.corechat-msg.user{background:linear-gradient(135deg,#2271b1,#135e96);color:#fff;border-bottom-right-radius:4px}
.corechat-typing{display:flex;align-items:center;gap:4px;padding:12px 14px}
.corechat-typing span{width:6px;height:6px;border-radius:50%;background:#9aa0a6;animation:corechat-typing-bounce 1.2s infinite ease-in-out}
.corechat-typing span:nth-child(2){animation-delay:.15s}
.corechat-typing span:nth-child(3){animation-delay:.3s}
@keyframes corechat-typing-bounce{0%,60%,100%{transform:translateY(0);opacity:.6}30%{transform:translateY(-4px);opacity:1}}
.corechat-quick{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 12px;background:#f6f7f7}
.corechat-quick button{font-size:12px;border:1px solid #d6d8db;background:#fff;border-radius:16px;padding:6px 12px;cursor:pointer;transition:background .15s ease,border-color .15s ease}
.corechat-quick button:hover{background:#eef4fa;border-color:#2271b1;color:#135e96}
.corechat-foot{display:flex;align-items:center;border-top:1px solid #e5e5e5;padding:10px;gap:8px;background:#fff}
.corechat-foot input{flex:1;border:1px solid #d6d8db;border-radius:20px;padding:9px 14px;font-size:13px;outline:none;transition:border-color .15s ease;font-family:inherit}
.corechat-foot input:focus{border-color:#2271b1}
.corechat-send{border:0;width:36px;height:36px;flex-shrink:0;border-radius:50%;background:linear-gradient(135deg,#2271b1,#135e96);color:#fff;cursor:pointer;font-size:14px;display:flex;align-items:center;justify-content:center;transition:transform .12s ease}
.corechat-send:hover{transform:scale(1.08)}

.corechat-leadbar{padding:0 14px 8px;background:#f6f7f7}
.corechat-leadbar-toggle{border:0;background:none;color:#2271b1;font-size:12px;font-weight:600;cursor:pointer;padding:4px 0;text-decoration:underline;text-underline-offset:2px}
.corechat-leadbar-toggle:hover{color:#135e96}
.corechat-leadform{background:#fff;border:1px solid #e5e5e5;border-radius:10px;padding:10px;margin-top:6px;display:flex;flex-direction:column;gap:6px}
.corechat-leadform input{border:1px solid #d6d8db;border-radius:8px;padding:7px 10px;font-size:12px;outline:none;font-family:inherit}
.corechat-leadform input:focus{border-color:#2271b1}
.corechat-leadform-btns{display:flex;gap:6px}
.corechat-leadform-submit{flex:1;border:0;background:linear-gradient(135deg,#2271b1,#135e96);color:#fff;border-radius:8px;padding:7px 10px;font-size:12px;cursor:pointer}
.corechat-leadform-submit:disabled{opacity:.6;cursor:default}
.corechat-leadform-cancel{border:1px solid #d6d8db;background:#fff;border-radius:8px;padding:7px 10px;font-size:12px;cursor:pointer}
.corechat-leadform-msg{font-size:11px;min-height:14px}

.corechat-privacy{padding:6px 14px 10px;background:#fff;font-size:10px;color:#8c8f94;line-height:1.4;text-align:center}
.corechat-privacy a{color:#8c8f94;text-decoration:underline}
.corechat-privacy a:hover{color:#2271b1}
