.gate-wa-root {
  --gate-wa-green: #1f8a4c;
  --gate-wa-green-dark: #176b3a;
  --gate-wa-cream: #f7faf7;
  --gate-wa-shadow: 0 16px 40px rgba(23, 107, 58, 0.28);
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 12060;
  font-family: inherit;
  pointer-events: none;
}

.gate-wa-root .gate-wa-launcher,
.gate-wa-root .gate-wa-panel {
  pointer-events: auto;
}

body.wsu-nav-open .gate-wa-root,
body.portal-sidebar-open .gate-wa-root {
  z-index: 70;
  pointer-events: none;
}

/* Keep WhatsApp on the bottom corner; lift Tatu above it */
html.has-gate-wa .mr-sisulu-root {
  bottom: max(5.6rem, calc(env(safe-area-inset-bottom, 0px) + 5.6rem));
}

.gate-wa-launcher {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.95rem 0.55rem 0.55rem;
  background: linear-gradient(135deg, var(--gate-wa-green), var(--gate-wa-green-dark));
  color: #fff;
  box-shadow: var(--gate-wa-shadow);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-width: 48px;
  min-height: 48px;
}

.gate-wa-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 46px rgba(23, 107, 58, 0.34);
}

.gate-wa-launcher:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.gate-wa-root.is-open .gate-wa-launcher {
  box-shadow: 0 10px 24px rgba(23, 107, 58, 0.2);
}

.gate-wa-launcher__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.gate-wa-launcher__label {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding-right: 0.15rem;
}

.gate-wa-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  width: min(320px, calc(100vw - 2rem));
  background: #fff;
  color: #1a1a2e;
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(20, 40, 28, 0.22);
  border: 1px solid rgba(31, 138, 76, 0.16);
  overflow: hidden;
  transform-origin: bottom right;
  animation: gate-wa-pop 0.18s ease;
}

.gate-wa-panel[hidden] {
  display: none !important;
}

@keyframes gate-wa-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gate-wa-panel__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.9rem 0.9rem 0.75rem;
  background: linear-gradient(135deg, var(--gate-wa-green), var(--gate-wa-green-dark));
  color: #fff;
}

.gate-wa-panel__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
}

.gate-wa-panel__eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.gate-wa-panel__head h2 {
  margin: 0.1rem 0 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}

.gate-wa-panel__close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.gate-wa-panel__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.gate-wa-panel__body {
  padding: 1rem 1.05rem 1.1rem;
  background: var(--gate-wa-cream);
}

.gate-wa-panel__body > p {
  margin: 0 0 0.7rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #2d3a32;
}

.gate-wa-panel__number {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: var(--gate-wa-green-dark) !important;
  letter-spacing: 0.01em;
}

.gate-wa-panel__steps {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #3d4a40;
}

.gate-wa-panel__steps li + li {
  margin-top: 0.2rem;
}

.gate-wa-panel__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gate-wa-green), var(--gate-wa-green-dark));
  color: #fff !important;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(23, 107, 58, 0.22);
}

.gate-wa-panel__cta:hover {
  filter: brightness(1.05);
}

@media (max-width: 640px) {
  .gate-wa-launcher__label {
    display: none;
  }

  .gate-wa-launcher {
    padding: 0.5rem;
    border-radius: 50%;
  }

  .gate-wa-launcher__icon {
    width: 42px;
    height: 42px;
  }

  html.has-gate-wa .mr-sisulu-root {
    bottom: max(5.4rem, calc(env(safe-area-inset-bottom, 0px) + 5.4rem));
  }
}
