#wali-webchat { --wwc: #6d4c41; --wwc-ink: #1f2937; position: fixed; bottom: 22px; right: 22px; z-index: 2147483000;
  font-family: "Cairo","Tajawal","Segoe UI",Tahoma,sans-serif; }
#wali-webchat * { box-sizing: border-box; }

#wali-webchat .wwc-btn { width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--wwc); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(0,0,0,.28); transition: transform .18s ease, opacity .18s ease; position: relative; }
#wali-webchat .wwc-btn:hover { transform: translateY(-2px) scale(1.04); }
#wali-webchat .wwc-btn.wwc-hidden { opacity: 0; pointer-events: none; transform: scale(.6); }
#wali-webchat .wwc-badge { position: absolute; top: 4px; right: 6px; width: 11px; height: 11px; border-radius: 50%;
  background: #e23b3b; border: 2px solid #fff; display: none; }

#wali-webchat .wwc-panel { position: absolute; bottom: 0; right: 0; width: 360px; max-width: calc(100vw - 32px);
  height: 540px; max-height: calc(100vh - 60px); background: #fff; border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.32); opacity: 0; transform: translateY(20px) scale(.96);
  pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
#wali-webchat .wwc-panel.wwc-show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

#wali-webchat .wwc-head { background: var(--wwc); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
#wali-webchat .wwc-ava { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
#wali-webchat .wwc-htext { flex: 1 1 auto; min-width: 0; }
#wali-webchat .wwc-title { font-weight: 700; font-size: 15px; line-height: 1.2; }
#wali-webchat .wwc-sub { font-size: 11px; opacity: .85; margin-top: 2px; }
#wali-webchat .wwc-close { background: transparent; border: none; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; opacity: .9; }
#wali-webchat .wwc-close:hover { opacity: 1; }

#wali-webchat .wwc-msgs { flex: 1 1 auto; overflow-y: auto; padding: 16px 14px; background: #f6f7f9; display: flex; flex-direction: column; gap: 8px; }
#wali-webchat .wwc-msg { max-width: 82%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; }
#wali-webchat .wwc-them { align-self: flex-start; background: #fff; color: var(--wwc-ink); border: 1px solid #e7e9ee; border-bottom-right-radius: 4px; }
#wali-webchat .wwc-me { align-self: flex-end; background: var(--wwc); color: #fff; border-bottom-left-radius: 4px; }
#wali-webchat .wwc-typing { display: flex; gap: 4px; align-items: center; }
#wali-webchat .wwc-typing span { width: 7px; height: 7px; border-radius: 50%; background: #b7bcc6; animation: wwcblink 1.2s infinite; }
#wali-webchat .wwc-typing span:nth-child(2) { animation-delay: .2s; }
#wali-webchat .wwc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes wwcblink { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }

#wali-webchat .wwc-input { display: flex; align-items: flex-end; gap: 8px; padding: 10px; background: #fff; border-top: 1px solid #eef0f3; }
#wali-webchat .wwc-input textarea { flex: 1 1 auto; resize: none; border: 1px solid #dfe3ea; border-radius: 12px; padding: 9px 12px;
  font-size: 14px; font-family: inherit; outline: none; max-height: 110px; line-height: 1.4; }
#wali-webchat .wwc-input textarea:focus { border-color: var(--wwc); }
#wali-webchat .wwc-send { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--wwc); color: #fff; display: flex; align-items: center; justify-content: center; }
#wali-webchat .wwc-send svg { transform: scaleX(-1); }
#wali-webchat .wwc-foot { text-align: center; font-size: 10px; color: #9aa0ab; padding: 6px; background: #fff; }

@media (max-width: 480px) {
  #wali-webchat { bottom: 14px; right: 14px; }
  #wali-webchat .wwc-panel { width: calc(100vw - 24px); height: calc(100vh - 90px); }
}
