/* WebRise Live-Chat */
.wr-chat{position:fixed;z-index:99999;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif}
.wr-chat--bottom-right{bottom:24px;right:24px}
.wr-chat--bottom-left{bottom:24px;left:24px}

/* Floating Button */
.wr-chat__btn{display:flex;align-items:center;justify-content:center;width:60px;height:60px;border-radius:50%;border:none;box-shadow:0 4px 24px rgba(0,0,0,.25);cursor:pointer;transition:transform .2s,box-shadow .2s;position:relative}
.wr-chat__btn:hover{transform:scale(1.08);box-shadow:0 6px 32px rgba(0,0,0,.3)}
.wr-chat__btn-icon{transition:opacity .2s,transform .2s}
.wr-chat__btn-icon--close{position:absolute;opacity:0;transform:rotate(-90deg)}
.wr-chat.wr-chat--open .wr-chat__btn-icon--chat{opacity:0;transform:rotate(90deg)}
.wr-chat.wr-chat--open .wr-chat__btn-icon--close{opacity:1;transform:rotate(0)}

/* Pulse animation on load */
@keyframes wrChatPulse{
	0%{box-shadow:0 4px 24px rgba(0,0,0,.25)}
	50%{box-shadow:0 4px 24px rgba(0,0,0,.25),0 0 0 12px rgba(0,102,255,.15)}
	100%{box-shadow:0 4px 24px rgba(0,0,0,.25),0 0 0 20px rgba(0,102,255,0)}
}
.wr-chat__btn--pulse{animation:wrChatPulse 2s ease-in-out 3}

/* Chat Panel */
.wr-chat__panel{position:absolute;bottom:72px;right:0;width:370px;max-height:520px;background:#fff;border-radius:16px;box-shadow:0 12px 48px rgba(0,0,0,.18);overflow:hidden;display:flex;flex-direction:column;opacity:0;transform:translateY(16px) scale(.95);pointer-events:none;transition:opacity .25s ease,transform .25s ease}
.wr-chat--bottom-left .wr-chat__panel{right:auto;left:0}
.wr-chat--open .wr-chat__panel{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}

/* Header */
.wr-chat__header{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;color:#fff;flex-shrink:0}
.wr-chat__header-info{display:flex;flex-direction:column;gap:2px}
.wr-chat__header-title{font-size:15px;font-weight:700}
.wr-chat__header-status{font-size:11px;opacity:.8}
.wr-chat__header-close{background:none;border:none;color:#fff;font-size:24px;cursor:pointer;line-height:1;padding:0 4px;opacity:.8;transition:opacity .15s}
.wr-chat__header-close:hover{opacity:1}

/* Messages */
.wr-chat__messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;min-height:120px;max-height:280px}
.wr-chat__msg{display:flex;gap:8px}
.wr-chat__msg--bot{justify-content:flex-start}
.wr-chat__msg--user{justify-content:flex-end}
.wr-chat__msg-bubble{max-width:80%;padding:10px 14px;border-radius:14px;font-size:13.5px;line-height:1.5;word-break:break-word}
.wr-chat__msg--bot .wr-chat__msg-bubble{background:#f0f2f5;color:#1a1a1a;border-bottom-left-radius:4px}
.wr-chat__msg--user .wr-chat__msg-bubble{background:#0066FF;color:#fff;border-bottom-right-radius:4px}

/* Quick Replies */
.wr-chat__quick-replies{display:flex;flex-wrap:wrap;gap:6px;padding:0 16px 12px}
.wr-chat__quick-btn{background:#f0f2f5;border:1px solid #e0e2e6;border-radius:20px;padding:6px 14px;font-size:12.5px;color:#333;cursor:pointer;transition:background .15s,border-color .15s;white-space:nowrap}
.wr-chat__quick-btn:hover{background:#e4e6ea;border-color:#ccc}

/* Form */
.wr-chat__form{border-top:1px solid #eee;padding:12px 16px;flex-shrink:0}
.wr-chat__form-fields{display:flex;flex-direction:column;gap:6px;margin-bottom:8px}
.wr-chat__input{width:100%;padding:8px 12px;border:1.5px solid #e0e0e0;border-radius:8px;font-size:13px;outline:none;transition:border-color .15s;box-sizing:border-box}
.wr-chat__input:focus{border-color:#0066FF}
.wr-chat__form-row{display:flex;align-items:flex-end;gap:8px}
.wr-chat__textarea{flex:1;padding:10px 12px;border:1.5px solid #e0e0e0;border-radius:12px;font-size:13.5px;resize:none;outline:none;transition:border-color .15s;font-family:inherit;max-height:80px;box-sizing:border-box}
.wr-chat__textarea:focus{border-color:#0066FF}
.wr-chat__send-btn{width:38px;height:38px;border-radius:50%;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:transform .15s,opacity .15s}
.wr-chat__send-btn:hover{transform:scale(1.08)}
.wr-chat__send-btn:disabled{opacity:.5;cursor:not-allowed;transform:none}

/* Success / Error states */
.wr-chat__status{text-align:center;padding:8px;font-size:12.5px;border-radius:8px;margin:0 16px 12px}
.wr-chat__status--success{background:#e8f5e9;color:#2e7d32}
.wr-chat__status--error{background:#fce4ec;color:#c62828}

/* Responsive */
@media(max-width:480px){
	.wr-chat--bottom-right,.wr-chat--bottom-left{bottom:16px;right:12px;left:12px}
	.wr-chat__btn{width:52px;height:52px}
	.wr-chat__panel{width:calc(100vw - 24px);right:0;left:0;bottom:64px;max-height:70vh}
	.wr-chat--bottom-left .wr-chat__panel{right:0;left:0}
}
