.mx-wa-gate-open { overflow: hidden; }
.mx-wa-gate[hidden] { display: none !important; }
.mx-wa-gate {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background: rgba(8, 10, 16, 0.72);
  backdrop-filter: blur(16px);
}
.mx-wa-gate__panel {
  width: min(100%, 720px);
  max-height: calc(100vh - 3rem);
  max-height: calc(100dvh - 3rem);
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(18,24,35,0.98), rgba(10,15,24,0.98));
  box-shadow: 0 28px 80px rgba(0,0,0,0.36);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mx-wa-gate__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.4rem 0.8rem;
}
.mx-wa-gate__eyebrow {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(var(--country-primary-light-rgb, 0,168,107),0.10);
  color: var(--mx-green-light);
  border: 1px solid rgba(var(--country-primary-light-rgb, 0,168,107),0.20);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.mx-wa-gate__title { margin: 0; color: #f5f7fb; font-size: 1.45rem; line-height: 1.15; }
.mx-wa-gate__hint { margin: 0.65rem 0 0; color: rgba(255,255,255,0.72); font-size: 0.92rem; line-height: 1.65; }
.mx-wa-gate__close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #fff;
  cursor: pointer;
}
.mx-wa-gate__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.6rem 1.4rem 1.4rem;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.mx-wa-gate__grid {
  display: grid;
  gap: 0.9rem 1rem;
}
.mx-wa-gate__grid--contact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
.mx-wa-gate__field { margin-bottom: 0.95rem; }
.mx-wa-gate__field label,
.mx-wa-gate__label { display:block; margin-bottom:0.45rem; color:#f5f7fb; font-size:0.86rem; font-weight:600; }
.mx-wa-gate__input, .mx-wa-gate__select {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: #fff;
  font: inherit;
}
.mx-wa-gate__textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}
.mx-wa-gate__select option { background: #101521; color: #fff; }
.mx-wa-gate__input:focus, .mx-wa-gate__select:focus {
  outline: none;
  border-color: rgba(var(--country-primary-light-rgb, 0,168,107),0.45);
  box-shadow: 0 0 0 4px rgba(var(--country-primary-light-rgb, 0,168,107),0.12);
}
.mx-wa-gate__optional {
  color: rgba(255,255,255,0.52);
  font-weight: 500;
  font-size: 0.78rem;
}
.mx-wa-gate__microcopy {
  margin-top: 0.45rem;
  color: rgba(255,255,255,0.58);
  font-size: 0.76rem;
  line-height: 1.5;
}
.mx-wa-gate__footnote {
  margin: 0.35rem 0 1rem;
  color: rgba(255,255,255,0.56);
  font-size: 0.78rem;
  line-height: 1.6;
}
.mx-wa-gate__error {
  margin: 0 0 0.9rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: rgba(239,68,68,0.12);
  color: #fecaca;
  border: 1px solid rgba(239,68,68,0.24);
  font-size: 0.84rem;
}
.mx-wa-gate__actions { display:flex; flex-direction:column; gap:0.75rem; }
.mx-wa-gate__submit {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg,var(--mx-green),var(--mx-green-light));
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.mx-wa-gate__submit[disabled] { opacity: 0.72; cursor: wait; }
.mx-wa-gate__secondary {
  display: inline-flex;
  justify-content: center;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.84rem;
}
@media (max-width: 640px) {
  .mx-wa-gate { padding: 0.9rem; align-items: end; }
  .mx-wa-gate__panel {
    width: 100%;
    max-height: calc(100vh - 1.8rem);
    max-height: calc(100dvh - 1.8rem);
    border-radius: 22px 22px 18px 18px;
  }
  .mx-wa-gate__title { font-size: 1.24rem; }
  .mx-wa-gate__grid--contact {
    grid-template-columns: 1fr;
  }
}
