.wa-widget { position: fixed; z-index: 60; right: 0.8rem; bottom: calc(var(--dock) + 0.9rem + env(safe-area-inset-bottom)); }
.wa-widget.is-deferred { opacity: 0; pointer-events: none; transform: translateY(8px); }

.wa-fab {
  position: relative;
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  background: var(--wa);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgb(18 140 70 / 0.35);
  cursor: pointer;
  transition: transform 0.2s ease;
}
.wa-fab:hover { transform: scale(1.06); }
.wa-fab__icon { width: 32px; height: 32px; }
.wa-fab__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e11d2e;
  color: white;
  border: 2px solid white;
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.wa-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(360px, calc(100vw - 1.4rem));
  border-radius: 22px;
  overflow: hidden;
  background: #efeae2;
  box-shadow: 0 22px 60px rgb(0 0 0 / 0.28);
  transform-origin: 90% 100%;
  animation: wa-in 0.28s ease;
}
.wa-panel[hidden] { display: none; }
@keyframes wa-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.wa-panel__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.85rem 0.85rem;
  background: #075e54;
  color: white;
}
.wa-panel__mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgb(255 255 255 / 0.12);
}
.wa-panel__mark .icon { width: 22px; height: 22px; }
.wa-panel__name { font-weight: 700; letter-spacing: -0.02em; }
.wa-panel__status { display: flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; opacity: 0.92; margin-top: 0.1rem; }
.wa-dot { width: 8px; height: 8px; border-radius: 50%; background: #7dffb2; box-shadow: 0 0 0 3px rgb(125 255 178 / 0.2); }
.wa-panel__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.wa-panel__body {
  min-height: 148px;
  padding: 0.95rem 0.85rem 0.4rem;
  background:
    radial-gradient(circle at 20% 10%, rgb(255 255 255 / 0.35), transparent 40%),
    linear-gradient(#efeae2, #e7e0d6);
}
.wa-bubble {
  width: fit-content;
  max-width: 88%;
  margin: 0 0 0.55rem;
  padding: 0.65rem 0.75rem 0.4rem;
  background: white;
  color: #1c140f;
  border-radius: 6px 16px 16px 16px;
  box-shadow: 0 1px 1px rgb(0 0 0 / 0.08);
}
.wa-bubble p { font-size: 0.94rem; line-height: 1.4; color: inherit; }
.wa-bubble time {
  display: block;
  margin-top: 0.25rem;
  text-align: right;
  font-size: 0.68rem;
  color: #8a8178;
}

.wa-panel__footer { padding: 0.35rem 0.75rem 0.85rem; background: #efeae2; }
.wa-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  border-radius: 999px;
  background: var(--wa);
  color: #07321a;
  text-decoration: none;
  font-weight: 750;
}
.wa-cta .icon { width: 1.2rem; height: 1.2rem; }
.wa-micro { margin: 0.45rem 0 0; text-align: center; color: #6f675f; font-size: 0.78rem; }

@media (min-width: 900px) {
  .wa-widget { right: 1.3rem; bottom: 1.3rem; }
}
