.popup-form-open {
  overflow: hidden;
}

.popup-form-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 24, 24, 0.82);
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease, visibility 160ms ease;
  z-index: 500;
}

.popup-form-overlay.open {
  opacity: 1;
  visibility: visible;
}

.popup-form-card {
  width: 100%;
  max-width: 480px;
  background: #FFFFFF;
  border-top: 4px solid #0D5630;
  transform: translateY(16px);
  transition: transform 220ms ease;
}

.popup-form-overlay.open .popup-form-card {
  transform: translateY(0);
}

.popup-form-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 18px;
}

.popup-form-kicker {
  font: 700 12px/1 'Roboto Condensed', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #83735F;
  margin: 0 0 8px;
}

.popup-form-title {
  font: 400 28px/1.1 'Fjalla One', sans-serif;
  color: #0D5630;
  margin: 0 0 8px;
}

.popup-form-subtext {
  font: 400 14px/1.5 'Roboto Condensed', sans-serif;
  color: #595959;
  margin: 0;
}

.popup-form-close {
  appearance: none;
  border: 0;
  background: none;
  color: #595959;
  font: 700 12px/1 'Roboto Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 4px 0;
}

.popup-form-body,
.popup-form-success {
  padding: 0 28px 28px;
}

.popup-form-hint {
  margin: 0 0 18px;
  padding: 10px 12px;
  background: #F7F5F2;
  border-left: 3px solid #D4AF37;
  font: 400 13px/1.5 'Roboto Condensed', sans-serif;
  color: #595959;
}

.popup-form-api-error {
  display: none;
  margin-bottom: 16px;
  padding: 12px;
  background: #FFF2F2;
  border-left: 3px solid #C62828;
  color: #7F1D1D;
  font: 400 13px/1.5 'Roboto Condensed', sans-serif;
}

.popup-form-api-error.visible {
  display: block;
}

.popup-form-field {
  display: block;
  margin-bottom: 16px;
}

.popup-form-label {
  display: block;
  margin-bottom: 6px;
  font: 700 12px/1 'Roboto Condensed', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0D5630;
}

.popup-form-input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #83735F;
  background: #FFFFFF;
  color: #181818;
  font: 400 15px/1.2 'Roboto Condensed', sans-serif;
}

.popup-form-input:focus {
  outline: none;
  border: 2px solid #0D5630;
  padding: 13px 15px;
}

.popup-form-field.has-error .popup-form-input {
  border: 2px solid #C62828;
  padding: 13px 15px;
}

.popup-form-error {
  display: none;
  margin-top: 6px;
  color: #C62828;
  font: 400 12px/1.4 'Roboto Condensed', sans-serif;
}

.popup-form-field.has-error .popup-form-error {
  display: block;
}

.popup-form-submit {
  display: inline-flex;
  width: 100%;
  height: 50px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  border: 0;
  background: #D4AF37;
  color: #181818;
  font: 700 16px/1 'Roboto Condensed', sans-serif;
  cursor: pointer;
}

.popup-form-submit:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.popup-form-privacy {
  margin: 12px 0 0;
  text-align: center;
  color: #83735F;
  font: 400 11px/1.5 'Roboto Condensed', sans-serif;
}

.popup-form-success {
  display: none;
  text-align: center;
}

.popup-form-success.visible {
  display: block;
}

.popup-form-success-icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: #0D5630;
  color: #FFFFFF;
  font: 700 14px/1 'Roboto Condensed', sans-serif;
}

.popup-form-success-title {
  margin: 0 0 8px;
  color: #0D5630;
  font: 400 24px/1.1 'Fjalla One', sans-serif;
}

.popup-form-success-text {
  margin: 0;
  color: #595959;
  font: 400 15px/1.5 'Roboto Condensed', sans-serif;
}

@media (max-width: 640px) {
  .popup-form-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .popup-form-card {
    max-width: none;
  }

  .popup-form-header,
  .popup-form-body,
  .popup-form-success {
    padding-left: 20px;
    padding-right: 20px;
  }
}
