.wp-gate {
  display: grid;
  align-items: safe center;
  justify-items: center;
  flex: 1;
  overflow: auto;
  padding: 24px 16px;
  background: #f4f8fa;
}

.wp-gate-card {
  box-sizing: border-box;
  width: min(100%, 620px);
  padding: clamp(20px, 5vw, 36px);
  border: 1px solid #dbe5ea;
  border-radius: 12px;
  background: #fff;
  color: #0a2940;
  font-family: Arial, sans-serif;
}

.wp-gate-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(calc(100% - 32px), 580px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
}

.wp-gate-dialog::backdrop {
  background: rgb(10 41 64 / 65%);
}

.wp-gate-close {
  position: absolute;
  top: 11px;
  right: 11px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.wp-gate-close .balas-icon {
  width: 22px;
  height: 22px;
}

.wp-gate-back {
  color: #176486;
  font-size: 14px;
}

.wp-gate-card :is(h1, h2) {
  margin: 16px 0 8px;
  color: #0a2940;
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.2;
}

.wp-gate-dialog h2 {
  margin: 0 26px 8px 0;
}

.wp-gate-card > p {
  margin: 0 0 20px;
  color: #455c6d;
  font-size: 16px;
  line-height: 1.5;
}

.wp-gate-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.wp-gate-wide {
  grid-column: 1 / -1;
}

.wp-gate-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 18px;
  border: 0;
  border-radius: 6px;
  background: #003c63;
  color: #fff;
  font: 700 14px Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.wp-gate-submit:hover {
  background: #005681;
  color: #fff;
}

.wp-gate-submit:disabled {
  opacity: .65;
  cursor: wait;
}

.wp-gate-status:empty {
  display: none;
}

.wp-gate-status {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.wp-gate-status.is-error {
  color: #8e1c1c;
}

@media (max-width: 520px) {
  .wp-gate-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

.wp-form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.wp-form-field label {
  font-size: 14px;
  font-weight: 700;
  color: #0a2940;
}

.wp-form-field :is(input, textarea) {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #c9d8e0;
  border-radius: 6px;
  font-size: 15px;
  font-family: Arial, sans-serif;
  color: #0a2940;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.wp-form-field textarea {
  resize: vertical;
}

.wp-form-field :is(input, textarea):focus {
  border-color: #0097d6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 151, 214, 0.25);
}

.wp-form-field input[aria-invalid="true"] {
  border-color: #c62828;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.2);
}

.wp-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

