/**
 * Genpro v3 — Global form field standardization
 */

body.genpro-futuristic {
  --fx-form-h: 44px;
  --fx-form-pad-x: 0.85rem;
  --fx-form-border: 1px solid rgba(255, 255, 255, 0.12);
  --fx-form-radius: var(--fx-radius-sm);
  --fx-form-bg: rgba(8, 10, 18, 0.65);
  --fx-form-focus: var(--fx-focus-ring, rgba(255, 102, 0, 0.45));
  --fx-form-error: #ff6b6b;
  --fx-form-gap: 0.65rem;
  --fx-form-label-size: var(--fx-text-sm);
}

/* ─── Form groups ─── */
body.genpro-futuristic .form-group-page-enhanced,
body.genpro-futuristic .form-group-enhanced,
body.genpro-futuristic .contact-form-group-enhanced {
  margin-bottom: var(--fx-form-gap) !important;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

body.genpro-futuristic .form-label-enhanced,
body.genpro-futuristic .contact-form-label-enhanced {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fx-form-label-size) !important;
  font-weight: 600;
  color: var(--fx-text-muted) !important;
  margin: 0 !important;
  line-height: 1.3;
}

body.genpro-futuristic .form-label-enhanced i,
body.genpro-futuristic .contact-form-label-enhanced i {
  width: 16px;
  color: var(--fx-accent-bright);
  font-size: 0.85rem;
}

/* ─── Inputs, selects, textareas ─── */
body.genpro-futuristic .form-input-enhanced,
body.genpro-futuristic .form-select-enhanced,
body.genpro-futuristic .form-textarea-enhanced,
body.genpro-futuristic .contact-form-input-enhanced,
body.genpro-futuristic .contact-form-textarea-enhanced,
body.genpro-futuristic .contact-form-select-enhanced {
  width: 100%;
  min-height: var(--fx-form-h);
  padding: 0.55rem var(--fx-form-pad-x) !important;
  font-size: var(--fx-text-base) !important;
  line-height: 1.4;
  color: var(--fx-text) !important;
  background: var(--fx-form-bg) !important;
  border: var(--fx-form-border) !important;
  border-radius: var(--fx-form-radius) !important;
  box-sizing: border-box;
  transition: border-color var(--fx-duration-fast), box-shadow var(--fx-duration-fast);
}

body.genpro-futuristic .form-textarea-enhanced,
body.genpro-futuristic .contact-form-textarea-enhanced {
  min-height: 120px;
  resize: vertical;
  padding-top: 0.65rem !important;
}

body.genpro-futuristic .form-input-enhanced:focus,
body.genpro-futuristic .form-select-enhanced:focus,
body.genpro-futuristic .form-textarea-enhanced:focus,
body.genpro-futuristic .contact-form-input-enhanced:focus,
body.genpro-futuristic .contact-form-textarea-enhanced:focus,
body.genpro-futuristic .contact-form-select-enhanced:focus {
  outline: none;
  border-color: var(--fx-form-focus) !important;
  box-shadow: 0 0 0 2px var(--fx-focus-glow, rgba(255, 102, 0, 0.15));
}

body.genpro-futuristic .form-input-enhanced.fx-field-invalid,
body.genpro-futuristic .form-select-enhanced.fx-field-invalid,
body.genpro-futuristic .form-textarea-enhanced.fx-field-invalid {
  border-color: var(--fx-form-error) !important;
}

/* ─── Inline error messages (expand safely) ─── */
body.genpro-futuristic .fx-field-error,
body.genpro-futuristic .support-form-message-enhanced,
body.genpro-futuristic .contact-form-message-enhanced {
  display: block;
  font-size: var(--fx-text-sm);
  line-height: 1.45;
  margin-top: 0.25rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--fx-radius-sm);
  overflow: visible;
  word-wrap: break-word;
}

body.genpro-futuristic .support-form-message-enhanced:not(:empty),
body.genpro-futuristic .contact-form-message-enhanced:not(:empty) {
  display: block !important;
}

body.genpro-futuristic .fx-field-error,
body.genpro-futuristic .support-form-message-enhanced.is-error,
body.genpro-futuristic .contact-form-message-enhanced.is-error {
  color: var(--fx-form-error);
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.25);
}

body.genpro-futuristic .support-form-message-enhanced.is-success,
body.genpro-futuristic .contact-form-message-enhanced.is-success {
  color: #4caf50;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.25);
}

/* ─── Support form card compaction ─── */
body.genpro-futuristic .support-form-card-enhanced,
body.genpro-futuristic .support-form-section-enhanced {
  padding: clamp(1rem, 3vw, 1.5rem) !important;
}

body.genpro-futuristic .support-form-header-enhanced {
  margin-bottom: 1rem !important;
}

body.genpro-futuristic .support-form-title-enhanced {
  font-size: clamp(1.1rem, 3vw, 1.35rem) !important;
  margin-bottom: 0.35rem !important;
}

body.genpro-futuristic .support-form-subtitle-enhanced {
  font-size: var(--fx-text-sm) !important;
  margin: 0 !important;
}

body.genpro-futuristic .support-form-enhanced {
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.genpro-futuristic .support-form-submit-enhanced,
body.genpro-futuristic .contact-form-submit-enhanced {
  min-height: var(--fx-form-h);
  margin-top: 0.5rem;
}

@media (max-width: 767px) {
  body.genpro-futuristic .support-page-wrapper-enhanced {
    gap: 1rem !important;
  }

  body.genpro-futuristic .support-form-section-enhanced {
    padding: 0 !important;
  }
}
