.iqtr-wa-root {
  --iqtr-wa-green: #25d366;
  --iqtr-wa-dark: #128c7e;
  --iqtr-wa-teal: #075e54;
  bottom: var(--iqtr-wa-bottom, 24px);
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  position: fixed;
  z-index: 99999;
}

.iqtr-wa-root.is-right { right: var(--iqtr-wa-side, 24px); }
.iqtr-wa-root.is-left { left: var(--iqtr-wa-side, 24px); }

.iqtr-wa-root *,
.iqtr-wa-root *::before,
.iqtr-wa-root *::after { box-sizing: border-box; }

.iqtr-wa-toggle {
  align-items: center;
  background: var(--iqtr-wa-green);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 6px 24px rgba(37, 211, 102, .45);
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 58px;
  justify-content: center;
  margin-left: auto;
  padding: 0;
  position: relative;
  transition: background .2s, transform .2s;
  width: 58px;
}

.iqtr-wa-root.is-left .iqtr-wa-toggle { margin-left: 0; margin-right: auto; }
.iqtr-wa-toggle:hover { background: var(--iqtr-wa-dark); transform: scale(1.05); }
.iqtr-wa-toggle svg { fill: currentColor; height: 30px; width: 30px; }
.iqtr-wa-close { display: none; font-size: 26px; font-weight: 300; line-height: 1; }
.iqtr-wa-root.is-open .iqtr-wa-toggle > svg { display: none; }
.iqtr-wa-root.is-open .iqtr-wa-close { display: block; }

.iqtr-wa-badge {
  align-items: center;
  background: #ea0038;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  font-size: 10px;
  font-weight: 700;
  height: 18px;
  justify-content: center;
  position: absolute;
  right: -2px;
  top: -2px;
  width: 18px;
}

.iqtr-wa-panel {
  background: #fff;
  border-radius: 14px;
  bottom: 72px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .22);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
  transform: translateY(12px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .2s, transform .2s;
  visibility: hidden;
  width: min(340px, calc(100vw - 32px));
}

.iqtr-wa-root.is-left .iqtr-wa-panel {
  left: 0;
  right: auto;
  transform-origin: bottom left;
}

.iqtr-wa-root.is-open .iqtr-wa-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.iqtr-wa-header {
  align-items: center;
  background: linear-gradient(135deg, var(--iqtr-wa-teal), var(--iqtr-wa-dark));
  color: #fff;
  display: flex;
  gap: 12px;
  padding: 18px;
}

.iqtr-wa-avatar,
.iqtr-wa-mini-avatar {
  align-items: center;
  background: var(--iqtr-wa-green);
  border-radius: 50%;
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
}

.iqtr-wa-avatar { height: 44px; width: 44px; }
.iqtr-wa-avatar svg { fill: #fff; height: 25px; width: 25px; }
.iqtr-wa-heading strong { display: block; font-size: 16px; line-height: 1.3; }
.iqtr-wa-heading span { align-items: center; display: flex; font-size: 12px; gap: 6px; margin-top: 4px; opacity: .9; }
.iqtr-wa-heading i { background: #74f59c; border-radius: 50%; display: inline-block; height: 7px; width: 7px; }

.iqtr-wa-body { background: #efeae2; padding: 20px 16px 22px; }
.iqtr-wa-bubble-row { align-items: flex-end; display: flex; gap: 8px; }
.iqtr-wa-mini-avatar { height: 30px; width: 30px; }
.iqtr-wa-mini-avatar svg { fill: #fff; height: 17px; width: 17px; }

.iqtr-wa-bubble {
  background: #fff;
  border-radius: 8px 8px 8px 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  color: #263238;
  max-width: 245px;
  padding: 10px 12px 7px;
  position: relative;
}

.iqtr-wa-bubble p { font-size: 13px; line-height: 1.45; margin: 0; }
.iqtr-wa-bubble time { color: #8696a0; display: block; font-size: 10px; margin-top: 4px; text-align: right; }
.iqtr-wa-footer { background: #fff; padding: 12px 16px 16px; }

.iqtr-wa-send {
  align-items: center;
  background: var(--iqtr-wa-green);
  border: 0;
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 9px;
  justify-content: center;
  padding: 12px 16px;
  transition: background .2s;
  width: 100%;
}

.iqtr-wa-send:hover { background: var(--iqtr-wa-dark); color: #fff; }
.iqtr-wa-send svg { fill: currentColor; height: 20px; width: 20px; }

@media (max-width: 549px) {
  .iqtr-wa-root {
    --iqtr-wa-bottom: max(16px, env(safe-area-inset-bottom));
    --iqtr-wa-side: 16px;
  }

  .iqtr-wa-toggle { height: 54px; width: 54px; }
  .iqtr-wa-panel { bottom: 66px; }
}

