/* ── Zewaj Guide chat widget ── */
.zw-fab {
  position: fixed; bottom: 22px; right: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--green); color: #fff; border: none; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 8px 28px rgba(13, 92, 63, .38);
  font-family: var(--font-arabic); font-size: 1.4rem;
  transition: transform .18s ease, box-shadow .18s ease;
}
.zw-fab:hover { transform: translateY(-2px) scale(1.04); }
.zw-fab:active { transform: scale(.96); }
.zw-fab .zw-fab-close { display: none; font-family: var(--font-body); font-size: 1.3rem; }
.zw-fab.open .zw-fab-close { display: block; }
.zw-fab.open .zw-fab-seal { display: none; }

.zw-panel {
  position: fixed; bottom: 92px; right: 22px; z-index: 90;
  width: 380px; max-width: calc(100vw - 32px);
  height: 540px; max-height: calc(100dvh - 120px);
  background: #fff; border-radius: var(--r-sheet);
  border: 1px solid var(--sand); box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(.97);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.zw-panel.open { opacity: 1; transform: none; pointer-events: auto; }

.zw-head {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 16px; border-bottom: 1px solid var(--sand);
  background: linear-gradient(180deg, #fff, var(--cream));
}
.zw-head .seal {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-arabic); font-size: 1.05rem; flex-shrink: 0;
}
.zw-head b { font-family: var(--font-display); font-size: .92rem; display: block; line-height: 1.2; }
.zw-head span { font-size: .73rem; color: var(--green); display: flex; align-items: center; gap: 5px; }
.zw-head span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.zw-body {
  flex: 1; overflow-y: auto; padding: 16px 14px;
  display: flex; flex-direction: column; gap: 11px;
  background: var(--cream);
}
.zw-msg {
  max-width: 86%; padding: 11px 14px; border-radius: 15px;
  font-size: .87rem; line-height: 1.5; white-space: pre-wrap;
  animation: zw-rise .3s ease both;
}
@keyframes zw-rise { from { opacity: 0; transform: translateY(8px); } }
.zw-msg.ai { background: #fff; border: 1px solid var(--sand); border-bottom-left-radius: 5px; align-self: flex-start; }
.zw-msg.me { background: var(--green); color: #fff; border-bottom-right-radius: 5px; align-self: flex-end; }
.zw-msg.typing { color: var(--gray); font-style: italic; background: transparent; border: none; padding: 4px 8px; animation: zw-blink 1.1s ease-in-out infinite; }
@keyframes zw-blink { 50% { opacity: .4; } }

.zw-suggests { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 10px; background: var(--cream); }
.zw-suggests button {
  font-family: var(--font-body); font-size: .76rem; font-weight: 600;
  background: #fff; border: 1.5px solid var(--sand-deep); color: var(--green-deep);
  border-radius: 999px; padding: 7px 13px; cursor: pointer;
  transition: border-color .15s ease;
}
.zw-suggests button:hover { border-color: var(--green); }

.zw-foot { display: flex; gap: 9px; padding: 12px 14px; border-top: 1px solid var(--sand); background: #fff; }
.zw-foot input {
  flex: 1; font-family: var(--font-body); font-size: .9rem;
  padding: 11px 15px; border-radius: 999px;
  border: 1.5px solid var(--sand-deep); background: var(--cream); outline: none;
}
.zw-foot input:focus { border-color: var(--green); }
.zw-foot button {
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--green); color: #fff; display: grid; place-items: center;
  transition: background .15s ease, transform .1s ease; flex-shrink: 0;
}
.zw-foot button:hover { background: var(--green-deep); }
.zw-foot button:active { transform: scale(.94); }
.zw-foot button:disabled { opacity: .55; cursor: default; }

@media (max-width: 480px) {
  .zw-panel { bottom: 0; right: 0; left: 0; width: 100%; max-width: 100%;
    height: 78dvh; max-height: 78dvh; border-radius: 18px 18px 0 0; }
  .zw-fab { bottom: 16px; right: 16px; }
  .zw-fab.open { bottom: auto; top: calc(22dvh + 12px); }
}
