/* ── Chat Support Widget ─────────────────────────────────────── */
#cw-container{position:fixed;bottom:1.2rem;right:1.2rem;z-index:9999;font-family:system-ui,-apple-system,sans-serif}
#cw-bubble{width:56px;height:56px;border-radius:50%;background:#c9a84c;color:#151515;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 20px rgba(0,0,0,.35);transition:transform .2s,box-shadow .2s}
#cw-bubble:hover{transform:scale(1.08);box-shadow:0 6px 28px rgba(0,0,0,.45)}
#cw-bubble svg{width:26px;height:26px}
#cw-bubble .cw-badge{position:absolute;top:-4px;right:-4px;background:#e53935;color:#fff;font-size:.65rem;font-weight:700;min-width:18px;height:18px;border-radius:9px;display:none;align-items:center;justify-content:center;padding:0 4px;border:2px solid #151515}
#cw-bubble .cw-badge.show{display:flex}

#cw-panel{position:absolute;bottom:70px;right:0;width:360px;max-height:500px;background:#1a1a1a;border:1px solid rgba(201,168,76,.2);border-radius:12px;box-shadow:0 8px 40px rgba(0,0,0,.5);display:none;flex-direction:column;overflow:hidden}
#cw-panel.open{display:flex}

.cw-head{background:linear-gradient(135deg,#151515,#1e1e1e);padding:.8rem 1rem;display:flex;align-items:center;gap:.6rem;border-bottom:1px solid rgba(201,168,76,.15)}
.cw-head-icon{width:32px;height:32px;border-radius:50%;background:#c9a84c;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.cw-head-icon svg{width:16px;height:16px;color:#151515}
.cw-head-avatar{width:36px;height:36px;border-radius:50%;object-fit:cover;border:2px solid rgba(201,168,76,.3);flex-shrink:0}
.cw-head-text{flex:1;min-width:0}
.cw-head-title{font-size:.8rem;font-weight:700;color:#e8e0d4;letter-spacing:.03em}
.cw-head-sub{font-size:.65rem;color:#999;margin-top:1px}
.cw-close{background:none;border:none;color:#999;cursor:pointer;padding:4px;display:flex;transition:color .15s}
.cw-close:hover{color:#c9a84c}
.cw-close svg{width:18px;height:18px}

.cw-messages{flex:1;overflow-y:auto;padding:.8rem;display:flex;flex-direction:column;gap:.5rem;min-height:200px;max-height:340px;scroll-behavior:smooth}
.cw-msg{max-width:85%;padding:.5rem .7rem;border-radius:10px;font-size:.78rem;line-height:1.45;word-wrap:break-word}
.cw-msg--guest{align-self:flex-end;background:#c9a84c;color:#151515;border-bottom-right-radius:2px}
.cw-msg--admin{align-self:flex-start;background:#2a2a2a;color:#e8e0d4;border-bottom-left-radius:2px}
.cw-msg-head{font-size:.6rem;font-weight:600;opacity:.7;margin-bottom:2px;letter-spacing:.02em}
.cw-msg-time{font-size:.58rem;opacity:.5;margin-top:3px}
.cw-empty{text-align:center;color:#666;font-size:.75rem;padding:2rem 1rem}

.cw-input-area{border-top:1px solid rgba(201,168,76,.1);padding:.6rem;display:flex;gap:.4rem;background:#151515}
.cw-input{flex:1;background:#222;border:1px solid #333;border-radius:8px;padding:.5rem .7rem;color:#e8e0d4;font-size:.78rem;outline:none;transition:border-color .15s}
.cw-input:focus{border-color:#c9a84c}
.cw-input::placeholder{color:#666}
.cw-send{background:#c9a84c;color:#151515;border:none;border-radius:8px;padding:.5rem .8rem;font-size:.75rem;font-weight:700;cursor:pointer;transition:background .15s;white-space:nowrap}
.cw-send:hover{background:#d4b65c}
.cw-send:disabled{opacity:.4;cursor:default}

.cw-pseudo{padding:1.2rem;display:flex;flex-direction:column;gap:.6rem;align-items:center}
.cw-pseudo-title{font-size:.82rem;font-weight:700;color:#e8e0d4;text-align:center}
.cw-pseudo-sub{font-size:.7rem;color:#999;text-align:center;margin-top:-.3rem}
.cw-pseudo-input{width:100%;background:#222;border:1px solid #333;border-radius:8px;padding:.55rem .7rem;color:#e8e0d4;font-size:.8rem;outline:none;text-align:center}
.cw-pseudo-input:focus{border-color:#c9a84c}
.cw-pseudo-btn{background:#c9a84c;color:#151515;border:none;border-radius:8px;padding:.55rem 1.2rem;font-size:.78rem;font-weight:700;cursor:pointer;width:100%;transition:background .15s}
.cw-pseudo-btn:hover{background:#d4b65c}
.cw-pseudo-err{color:#e53935;font-size:.7rem;text-align:center;min-height:1em}

@media(max-width:480px){
  #cw-panel{width:calc(100vw - 1.5rem);right:-.3rem;bottom:68px;max-height:70vh}
  #cw-container{bottom:.8rem;right:.8rem}
}
