/* AWMZA Live Chat widget */
#awmza-chat-root, #awmza-chat-root * { box-sizing: border-box; }
#awmza-chat-root {
  --aw-grad: linear-gradient(135deg, #00b4a0 0%, #1e7bff 100%);
  --aw-grad-soft: linear-gradient(135deg, #e9fffb 0%, #eef4ff 100%);
  --aw-ink: #0f2740;
  --aw-bubble-bot: #f1f5fb;
  --aw-bubble-user: linear-gradient(135deg, #00b4a0 0%, #1e7bff 100%);
  font-family: -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

/* launcher button */
.aw-launch {
  position: fixed; bottom: 96px; right: 22px; z-index: 999999;
  width: 64px; height: 64px; border: none; border-radius: 50%;
  background: var(--aw-grad); cursor: pointer;
  box-shadow: 0 10px 30px rgba(30,123,255,.35), 0 4px 10px rgba(0,180,160,.3);
  display: flex; align-items: center; justify-content: center;
  transition: transform .18s ease, box-shadow .18s ease;
  animation: aw-pop .4s ease;
}
.aw-launch:hover { transform: scale(1.07) translateY(-2px); }
.aw-launch svg { width: 34px !important; height: 34px !important; }
.aw-launch-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.aw-launch { padding: 3px; }
.aw-launch .aw-dot {
  position: absolute; top: 10px; right: 12px; width: 12px; height: 12px;
  background: #ff5b6e; border-radius: 50%; border: 2px solid #fff;
}
@keyframes aw-pop { from { transform: scale(.4); opacity: 0 } to { transform: scale(1); opacity: 1 } }

/* panel */
.aw-panel {
  position: fixed; bottom: 176px; right: 22px; z-index: 999999;
  width: 380px; max-width: calc(100vw - 32px);
  height: 580px; max-height: calc(100vh - 130px);
  background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(15,39,64,.28);
  display: flex; flex-direction: column;
  transform-origin: bottom right; animation: aw-open .22s ease;
}
@keyframes aw-open { from { transform: scale(.9); opacity: 0 } to { transform: scale(1); opacity: 1 } }

.aw-head {
  background: var(--aw-grad); color: #fff; padding: 16px 18px;
  display: flex; align-items: center; gap: 12px;
}
.aw-head .aw-av {
  width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.aw-head h4 { margin: 0; font-size: 16px; font-weight: 700; }
.aw-head p { margin: 2px 0 0; font-size: 12px; opacity: .9; }
.aw-head .aw-x { margin-left: auto; cursor: pointer; opacity: .9; font-size: 22px; line-height: 1; background: none; border: none; color: #fff; }

.aw-body {
  flex: 1; overflow-y: auto; padding: 16px;
  background: var(--aw-grad-soft);
  display: flex; flex-direction: column; gap: 10px;
}
.aw-msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.aw-msg.bot  { background: var(--aw-bubble-bot); color: var(--aw-ink); align-self: flex-start; border-bottom-left-radius: 5px; box-shadow: 0 2px 6px rgba(15,39,64,.06); }
.aw-msg.user { background: var(--aw-bubble-user); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.aw-msg img { max-width: 100%; border-radius: 10px; margin-top: 6px; }
.aw-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: var(--aw-bubble-bot); border-radius: 16px; }
.aw-typing span { width: 7px; height: 7px; background: #9bb0c9; border-radius: 50%; animation: aw-bl 1s infinite; }
.aw-typing span:nth-child(2){ animation-delay:.2s } .aw-typing span:nth-child(3){ animation-delay:.4s }
@keyframes aw-bl { 0%,60%,100%{ opacity:.3; transform: translateY(0) } 30%{ opacity:1; transform: translateY(-3px) } }

.aw-foot { padding: 10px 12px; background: #fff; border-top: 1px solid #eef2f7; }
.aw-row { display: flex; align-items: center; gap: 8px; }
.aw-input {
  flex: 1; border: 1px solid #dfe6ef; border-radius: 22px; padding: 11px 16px;
  font-size: 14px; outline: none; resize: none; max-height: 90px; font-family: inherit;
}
.aw-input:focus { border-color: #1e7bff; }
.aw-ic {
  width: 42px; height: 42px; min-width: 42px; border: none; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: #eef4ff; transition: background .15s;
}
.aw-ic:hover { background: #dfeaff; }
.aw-ic svg { width: 20px !important; height: 20px !important; fill: #1e7bff; flex-shrink: 0; }
.aw-send { background: var(--aw-grad); }
.aw-send svg { fill: #fff; }
.aw-ic.rec { background: #ff5b6e; animation: aw-pulse 1s infinite; }
.aw-ic.rec svg { fill: #fff; }
@keyframes aw-pulse { 0%,100%{ box-shadow: 0 0 0 0 rgba(255,91,110,.5) } 50%{ box-shadow: 0 0 0 8px rgba(255,91,110,0) } }
.aw-credit { text-align: center; font-size: 10px; color: #9bb0c9; margin: 6px 0 0; }

/* RTL (Urdu / Arabic) */
.aw-msg[dir="rtl"] { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif; line-height: 2; text-align: right; }

@media (max-width: 480px) {
  .aw-panel { right: 8px; bottom: 156px; width: calc(100vw - 16px); height: calc(100vh - 110px); }
  .aw-launch { right: 16px; bottom: 88px; }
}
