#eb-chat-widget{font-family:inherit;direction:rtl}
.eb-chat-fab{position:fixed;right:24px;bottom:24px;z-index:9999;border:0;border-radius:999px;padding:14px 20px;background:linear-gradient(135deg,#20c997,#22c55e);color:#fff;font-weight:900;box-shadow:0 16px 36px rgba(0,0,0,.35);cursor:pointer;display:flex;gap:10px;align-items:center}
.eb-chat-fab b{width:24px;height:24px;border-radius:50%;background:rgba(255,255,255,.22);display:inline-flex;align-items:center;justify-content:center}
.eb-chat-panel{position:fixed;right:24px;bottom:88px;width:min(390px,calc(100vw - 32px));height:560px;max-height:calc(100vh - 120px);z-index:9999;background:#111827;border:1px solid rgba(255,255,255,.12);border-radius:24px;box-shadow:0 24px 60px rgba(0,0,0,.45);overflow:hidden;display:none;color:#fff}
.eb-chat-panel.open{display:flex;flex-direction:column}.eb-chat-panel header{padding:16px 18px;background:linear-gradient(135deg,#1f2937,#0f172a);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.1)}
.eb-chat-panel header strong{display:block;font-size:18px}.eb-chat-panel header small{display:block;color:#cbd5e1;margin-top:4px;line-height:1.7}.eb-chat-close{border:0;background:rgba(255,255,255,.12);color:#fff;border-radius:12px;font-size:24px;width:38px;height:38px;cursor:pointer}
.eb-chat-body{padding:14px;display:flex;flex-direction:column;min-height:0;flex:1}.eb-chat-start{display:grid;gap:10px}.eb-chat-start input,.eb-chat-start textarea,.eb-chat-input{width:100%;box-sizing:border-box;border:1px solid rgba(255,255,255,.12);background:#0b1220;color:#fff;border-radius:16px;padding:12px 14px;font-family:inherit;outline:none}.eb-chat-start input:focus,.eb-chat-start textarea:focus,.eb-chat-input:focus{border-color:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.12)}
.eb-chat-start-btn,.eb-chat-form button{border:0;border-radius:16px;padding:12px 16px;background:#22c55e;color:#fff;font-weight:900;cursor:pointer;font-family:inherit}.eb-chat-conversation{min-height:0;flex:1;display:flex;flex-direction:column}.eb-chat-messages{flex:1;overflow:auto;display:flex;flex-direction:column;gap:10px;padding:4px 2px 12px}.eb-chat-msg{max-width:84%;border-radius:18px;padding:10px 12px;line-height:1.8;font-size:14px;overflow-wrap:anywhere}.eb-chat-msg p{margin:0;white-space:pre-wrap;word-break:break-word}.eb-chat-msg time{display:block;font-size:11px;opacity:.65;margin-top:3px}.eb-chat-msg.visitor{align-self:flex-start;background:#2563eb;color:#fff;border-bottom-left-radius:6px}.eb-chat-msg.admin{align-self:flex-end;background:#1f2937;color:#fff;border:1px solid rgba(255,255,255,.1);border-bottom-right-radius:6px}
.eb-chat-form{display:grid;grid-template-columns:1fr 44px 72px;gap:8px;align-items:center}.eb-chat-input{flex:1}.eb-chat-file{height:44px;display:flex;align-items:center;justify-content:center;background:#0b1220;border:1px solid rgba(255,255,255,.12);border-radius:14px;cursor:pointer;font-size:20px}.eb-chat-file input{position:absolute;opacity:0;width:1px;height:1px;overflow:hidden}.eb-chat-attach{display:block;margin-top:8px;border:1px solid rgba(255,255,255,.16);border-radius:14px;overflow:hidden;background:rgba(255,255,255,.06);color:#fff;text-decoration:none}.eb-chat-attach img{display:block;max-width:230px;max-height:190px;width:auto;height:auto}.eb-chat-attach span{display:block;padding:8px 10px;font-size:12px}.eb-chat-attach small{opacity:.75;margin-right:4px}
.eb-chat-alert{margin:0 0 10px 0;padding:10px 12px;border-radius:14px;font-size:13px;line-height:1.8;direction:rtl;text-align:right}.eb-chat-alert.error{background:rgba(239,68,68,.16);border:1px solid rgba(239,68,68,.38);color:#fecaca}.eb-chat-alert.info{background:rgba(34,197,94,.14);border:1px solid rgba(34,197,94,.32);color:#bbf7d0}
@media(max-width:520px){.eb-chat-fab{right:16px;bottom:16px}.eb-chat-panel{right:16px;bottom:76px}.eb-chat-form{grid-template-columns:1fr 42px}.eb-chat-form button{grid-column:1 / -1}}

/* v4: make sure hidden boxes really disappear even when class styles use display:flex/grid */
.eb-chat-start[hidden],
.eb-chat-conversation[hidden],
.eb-chat-alert[hidden]{display:none!important;}

.eb-chat-start[hidden],.eb-chat-conversation[hidden]{display:none!important}
.eb-chat-alert.info{display:block;background:rgba(34,197,94,.14);border:1px solid rgba(34,197,94,.32);color:#bbf7d0;border-radius:14px;padding:10px 12px;margin-bottom:10px;line-height:1.8}

.eb-chat-file.has-file{border-color:#22c55e;background:#12351f;color:#bbf7d0}

/* =========================================================
   RESPONSIVE FINAL PATCH v60 - Visitor chat
   ========================================================= */
@media(max-width:520px){
  .eb-chat-fab{right:12px;left:12px;bottom:12px;justify-content:center;width:auto;min-height:48px}
  .eb-chat-panel{right:8px;left:8px;bottom:70px;width:auto;height:min(650px,calc(100vh - 86px));max-height:calc(100vh - 86px);border-radius:20px}
  .eb-chat-panel header{padding:13px 14px}.eb-chat-panel header strong{font-size:16px}.eb-chat-body{padding:11px}
  .eb-chat-msg{max-width:92%;font-size:13px}.eb-chat-form{grid-template-columns:1fr 42px}.eb-chat-form button{grid-column:1/-1;min-height:42px}.eb-chat-attach img{max-width:100%;height:auto}
}
