.wsp-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
}

.wsp-gate-modal.is-open {
  display: block;
}

.wsp-gate-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.56);
}

.wsp-gate-modal__dialog {
  position: relative;
  max-width: 520px;
  margin: 7vh auto 0;
  background: #fff;
  color: #20150f;
  border-radius: 16px;
  border: 1px solid #e7d7c1;
  box-shadow: 0 28px 60px rgba(18, 10, 5, 0.22);
  padding: 20px;
}

.wsp-gate-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.wsp-gate-modal__title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
}

.wsp-gate-modal__subtitle {
  margin: 6px 0 0;
  color: #5d4b40;
  font-size: 0.94rem;
}

.wsp-gate-modal__close {
  border: 0;
  border-radius: 8px;
  background: #f4ece2;
  color: #4f3e33;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 8px 10px;
}

.wsp-gate-form {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.wsp-gate-field {
  display: grid;
  gap: 6px;
}

.wsp-gate-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #3f2f25;
}

.wsp-gate-input,
.wsp-gate-select {
  width: 100%;
  border: 1px solid #d6c2aa;
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1.2;
  color: #1f130d;
  font-family: inherit;
  background: #fff;
  padding: 11px 12px;
}

.wsp-gate-input:focus,
.wsp-gate-select:focus {
  outline: none;
  border-color: #9f6f3f;
  box-shadow: 0 0 0 3px rgba(159, 111, 63, 0.16);
}

.wsp-gate-phone {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
}

.wsp-gate-actions {
  margin-top: 2px;
  display: grid;
  gap: 8px;
}

.wsp-gate-submit {
  border: 0;
  border-radius: 11px;
  background: linear-gradient(140deg, #1abf65, #14974f);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 14px;
  cursor: pointer;
}

.wsp-gate-submit:hover {
  filter: brightness(1.05);
}

.wsp-gate-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.wsp-gate-msg {
  margin: 0;
  min-height: 20px;
  color: #6f5f53;
  font-size: 0.88rem;
}

.wsp-gate-msg.is-error {
  color: #a40000;
}

.wsp-gate-msg.is-ok {
  color: #11773e;
}

@media (max-width: 680px) {
  .wsp-gate-modal__dialog {
    margin: 4vh 14px 0;
    max-width: none;
    padding: 16px;
  }

  .wsp-gate-phone {
    grid-template-columns: 1fr;
  }
}
