/* innowhatif concierge chat widget — namespaced with .iw- to avoid clashes */
.iw-root {
  --iw-navy: #0E2238;
  --iw-teal: #117563;
  --iw-teal-bright: #20A48A;
  --iw-mint: #B5F2EE;
  --iw-bot: #eef5f4;
  --iw-line: #e3e9ee;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* ---- floating button ---- */
.iw-fab {
  width: 58px; height: 58px;
  border-radius: 50%;
  border: 0;
  background: var(--iw-teal);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(14, 34, 56, 0.28);
  display: flex; align-items: center; justify-content: center;
  transition: transform .18s ease, background .18s ease;
  margin-left: auto;
}
.iw-fab:hover { background: #0c6a73; transform: translateY(-2px); }
.iw-fab svg { width: 30px; height: 30px; }
.iw-fab .iw-x { display: none; }
.iw-root.iw-open .iw-fab .iw-bot-icon { display: none; }
.iw-root.iw-open .iw-fab .iw-x { display: block; }

/* ---- panel ---- */
.iw-panel {
  position: absolute;
  right: 0; bottom: 72px;
  width: 372px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(14, 34, 56, 0.30);
  display: flex; flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.iw-root.iw-open .iw-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

/* ---- header ---- */
.iw-head {
  background: var(--iw-navy);
  color: #fff;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 11px;
}
.iw-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--iw-teal-bright);
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex: 0 0 auto;
}
.iw-avatar svg { width: 22px; height: 22px; }
.iw-head-text { line-height: 1.25; }
.iw-head-title { font-weight: 700; font-size: 15px; }
.iw-head-sub { font-size: 11.5px; opacity: .72; display: flex; align-items: center; gap: 5px; }
.iw-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; display: inline-block; }
.iw-close {
  margin-left: auto; background: transparent; border: 0; color: #fff;
  opacity: .8; cursor: pointer; padding: 4px; display: flex;
}
.iw-close:hover { opacity: 1; }
.iw-close svg { width: 20px; height: 20px; }

/* ---- messages ---- */
.iw-msgs {
  flex: 1; overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  background: #fbfdfd;
}
.iw-msg { max-width: 84%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.iw-msg.bot { background: var(--iw-bot); color: var(--iw-navy); align-self: flex-start; border-bottom-left-radius: 5px; }
.iw-msg.user { background: var(--iw-teal); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.iw-msg.err { background: #fdecec; color: #b3261e; align-self: flex-start; }
.iw-msg a { color: inherit; text-decoration: underline; }

/* typing indicator */
.iw-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--iw-bot); border-radius: 14px; border-bottom-left-radius: 5px; }
.iw-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9bb3b0; animation: iw-bounce 1.2s infinite ease-in-out; }
.iw-typing span:nth-child(2) { animation-delay: .15s; }
.iw-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes iw-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ---- suggestions ---- */
.iw-suggest { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 16px 12px; }
.iw-chip {
  font: inherit; font-size: 12.5px;
  background: #fff; color: var(--iw-teal);
  border: 1px solid #cfe5e2; border-radius: 999px;
  padding: 7px 12px; cursor: pointer; text-align: left;
}
.iw-chip:hover { background: #eef6f5; }

/* ---- input ---- */
.iw-form { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-top: 1px solid var(--iw-line); background: #fff; }
.iw-input {
  flex: 1; font: inherit; font-size: 14px;
  border: 1px solid var(--iw-line); border-radius: 22px;
  padding: 10px 15px; color: var(--iw-navy); background: #f7fafa;
}
.iw-input:focus { outline: none; border-color: var(--iw-teal-bright); background: #fff; }
.iw-send {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--iw-teal); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.iw-send:hover { background: #0c6a73; }
.iw-send:disabled { background: #a9c4c1; cursor: default; }
.iw-send svg { width: 19px; height: 19px; }

.iw-foot { text-align: center; font-size: 10.5px; color: #9aa7b2; padding: 0 0 9px; background: #fff; }

/* hide the bubble when the mobile nav menu is open */
body.menu-open .iw-root { display: none; }

@media (max-width: 480px) {
  .iw-root { right: 16px; bottom: 16px; }
  .iw-panel { height: 70vh; bottom: 70px; }
}
