.sp-chat-toggle{position:fixed;bottom:24px;right:24px;width:56px;height:56px;border-radius:50%;background:#C69F73;color:#fff;border:none;cursor:pointer;box-shadow:0 4px 16px rgba(0,0,0,.25);z-index:99999;display:flex;align-items:center;justify-content:center;transition:transform .2s,background .2s}
.sp-chat-toggle:hover{transform:scale(1.08);background:#b8916a}
.sp-chat-toggle svg{width:28px;height:28px;fill:currentColor}
.sp-chat-toggle .sp-close-icon{display:none}
.sp-chat-toggle.sp-open .sp-chat-icon{display:none}
.sp-chat-toggle.sp-open .sp-close-icon{display:block}

.sp-chat-panel{position:fixed;bottom:92px;right:24px;width:380px;height:520px;background:#fff;border-radius:16px;box-shadow:0 8px 32px rgba(0,0,0,.18);z-index:99998;display:none;flex-direction:column;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif}
.sp-chat-panel.sp-open{display:flex}

@media(max-width:480px){
.sp-chat-panel{bottom:0;right:0;width:100%;height:100%;border-radius:0}
.sp-chat-toggle{bottom:16px;right:16px}
}

.sp-chat-header{background:#C69F73;color:#fff;padding:14px 18px;display:flex;align-items:center;gap:10px;flex-shrink:0}
.sp-chat-header-dot{width:10px;height:10px;background:#4ade80;border-radius:50%;flex-shrink:0}
.sp-chat-header-title{font-size:15px;font-weight:600;flex:1}
.sp-chat-header-close{background:none;border:none;color:#fff;cursor:pointer;font-size:20px;padding:0 4px;opacity:.7;display:none}
.sp-chat-header-close:hover{opacity:1}
@media(max-width:480px){.sp-chat-header-close{display:block}}

.sp-chat-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px;background:#f8f9fa}
.sp-chat-messages::-webkit-scrollbar{width:4px}
.sp-chat-messages::-webkit-scrollbar-thumb{background:#ccc;border-radius:4px}

.sp-msg{max-width:85%;padding:10px 14px;border-radius:14px;font-size:14px;line-height:1.5;word-wrap:break-word}
.sp-msg a{color:#2563eb;text-decoration:underline}
.sp-msg-bot{background:#fff;color:#C69F73;align-self:flex-start;border:1px solid #e5e7eb;border-bottom-left-radius:4px}
.sp-msg-user{background:#C69F73;color:#fff;align-self:flex-end;border-bottom-right-radius:4px}

.sp-typing{align-self:flex-start;background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:10px 18px;display:none}
.sp-typing.sp-show{display:flex}
.sp-typing span{width:7px;height:7px;background:#999;border-radius:50%;display:inline-block;margin:0 2px;animation:sp-bounce 1.4s infinite ease-in-out}
.sp-typing span:nth-child(1){animation-delay:0s}
.sp-typing span:nth-child(2){animation-delay:.2s}
.sp-typing span:nth-child(3){animation-delay:.4s}
@keyframes sp-bounce{0%,80%,100%{transform:scale(0)}40%{transform:scale(1)}}

.sp-chat-input{display:flex;gap:8px;padding:12px;border-top:1px solid #e5e7eb;background:#fff;flex-shrink:0}
.sp-chat-input textarea{flex:1;border:1px solid #ddd;border-radius:10px;padding:10px 12px;font-size:14px;font-family:inherit;resize:none;outline:none;max-height:80px;line-height:1.4}
.sp-chat-input textarea:focus{border-color:#C69F73}
.sp-chat-input button{background:#C69F73;color:#fff;border:none;border-radius:10px;padding:0 16px;cursor:pointer;font-size:14px;font-weight:600;transition:background .2s;flex-shrink:0}
.sp-chat-input button:hover{background:#b8916a}
.sp-chat-input button:disabled{opacity:.5;cursor:not-allowed}

.sp-chat-footer{text-align:center;padding:6px;font-size:11px;color:#999;background:#fff;border-top:1px solid #f0f0f0;flex-shrink:0}
.sp-chat-footer a{color:#999;text-decoration:none}
.sp-chat-footer a:hover{color:#666;text-decoration:underline}
