.form-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: min(5vh, 28px) 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.form-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.form-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 24, 0.82);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 280ms ease;
}

.form-modal.is-visible .form-modal__backdrop {
  opacity: 1;
}

.form-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(600px, 100%);
  border-radius: 14px;
  border: 1px solid rgba(0, 209, 255, 0.35);
  background: linear-gradient(165deg, rgba(7, 18, 40, 0.97), rgba(4, 10, 24, 0.97));
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.52), 0 0 32px rgba(0, 209, 255, 0.1);
  transform: translateY(22px) scale(0.97);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.21, 1, 0.32, 1), opacity 320ms ease;
  overflow: hidden;
}

.form-modal.is-visible .form-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.form-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-modal__head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #f5fbff;
}

.form-modal__close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(0, 209, 255, 0.35);
  background: rgba(0, 209, 255, 0.08);
  color: #aeeeff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.form-modal__close:hover {
  transform: scale(1.05);
  border-color: rgba(0, 209, 255, 0.65);
  box-shadow: 0 0 14px rgba(0, 209, 255, 0.2);
}

.form-modal__close svg {
  width: 18px;
  height: 18px;
}

.form-modal__body {
  padding: 18px;
  max-height: min(80vh, 700px);
  overflow-y: auto;
}

.lead-form {
  display: grid;
  gap: 14px;
}

.lead-form__subtitle {
  margin: 0;
  color: rgba(202, 228, 246, 0.85);
  font-size: 0.85rem;
}

.lead-form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 480px) {
  .lead-form__row {
    grid-template-columns: 1fr 1fr;
  }
}

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

.lead-field label {
  color: rgba(180, 216, 242, 0.9);
  font-size: 0.75rem;
  font-weight: 700;
}

.lead-field input,
.lead-field select,
.lead-field textarea {
  width: 100%;
  border: 1px solid rgba(84, 177, 255, 0.35);
  border-radius: 10px;
  background: rgba(7, 24, 52, 0.85);
  color: #ecf8ff;
  padding: 11px 13px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.lead-field input:focus,
.lead-field select:focus,
.lead-field textarea:focus {
  border-color: rgba(0, 209, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(0, 209, 255, 0.1), 0 0 16px rgba(0, 209, 255, 0.12);
}

.lead-field textarea {
  resize: vertical;
  min-height: 100px;
}

.lead-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #8fefff 50%),
    linear-gradient(135deg, #8fefff 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 8px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.lead-field select option {
  color: #0b1e3b;
  background: #fff;
}

.lead-field__error {
  margin: 4px 0 0;
  color: #ff8dad;
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1.3;
  min-height: 1em;
}

.lead-field input.is-invalid,
.lead-field select.is-invalid,
.lead-field textarea.is-invalid {
  border-color: rgba(255, 84, 138, 0.8);
  box-shadow: 0 0 0 2px rgba(255, 84, 138, 0.15);
}

.lead-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(197, 220, 241, 0.85);
  font-size: 0.76rem;
  line-height: 1.35;
}

.lead-consent input {
  margin-top: 2px;
  accent-color: #00d1ff;
  width: 16px;
  height: 16px;
}

.lead-form__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.lead-submit-btn {
  border: 1px solid rgba(0, 209, 255, 0.55);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(6, 27, 52, 0.94), rgba(5, 17, 35, 0.94));
  color: #e9f9ff;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 22px;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0, 209, 255, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.lead-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(0, 209, 255, 0.28);
}

.lead-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lead-form__status {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(187, 216, 242, 0.8);
}

.lead-form__status.is-success { color: #8dffd0; }
.lead-form__status.is-error   { color: #ff9eb8; }
.lead-form__status.is-pending { color: #8fefff; }
