/**
 * Modern Gradient Theme - Purple & Blue
 * A contemporary design with gradient accents and smooth transitions
 */

.dynamic-form {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Form Container */
.dynamic-form-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
  overflow: hidden;
}

/* Form Header */
.dynamic-form-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px;
  text-align: center;
}

.dynamic-form-title {
  margin: 0 0 12px 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.dynamic-form-description {
  margin: 0;
  font-size: 16px;
  opacity: 0.95;
  line-height: 1.6;
}

/* Form Body */
.dynamic-form-body {
  padding: 40px;
}

/* Sections */
.form-section {
  margin-bottom: 40px;
}

.form-section-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 3px solid;
  border-image: linear-gradient(90deg, #667eea, #764ba2) 1;
}

.form-section-title {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-section-icon {
  font-size: 28px;
}

.form-section-subtitle {
  margin: 0 0 4px 0;
  font-size: 16px;
  color: #667eea;
  font-weight: 600;
}

.form-section-description {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

/* Form Fields */
.form-field {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.form-label.required::after {
  content: "*";
  color: #ef4444;
  margin-left: 4px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: white;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-help-text {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #6b7280;
}

/* Radio & Checkbox */
.form-choice-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-choice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-choice-item:hover {
  border-color: #667eea;
  background: #f9fafb;
}

.form-choice-item input[type="radio"],
.form-choice-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.form-choice-label {
  font-size: 15px;
  color: #374151;
  cursor: pointer;
}

/* File Upload */
.form-file-upload {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.form-file-upload:hover {
  border-color: #667eea;
  background: #f9fafb;
}

.form-file-input {
  display: none;
}

.form-file-label {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.form-file-label:hover {
  transform: translateY(-2px);
}

/* Content Elements */
.form-heading {
  margin: 32px 0 16px 0;
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}

.form-paragraph {
  margin: 16px 0;
  font-size: 15px;
  color: #4b5563;
  line-height: 1.6;
}

.form-divider {
  margin: 32px 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #667eea, #764ba2, transparent);
  border: none;
}

/* Submit Button */
.form-submit-container {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.form-submit-button {
  padding: 14px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.form-submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.form-submit-button:active {
  transform: translateY(0);
}

/* Error States */
.form-field.error .form-input,
.form-field.error .form-textarea,
.form-field.error .form-select {
  border-color: #ef4444;
}

.form-error-message {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #ef4444;
  font-weight: 500;
}

/* Success Message */
.form-success {
  padding: 20px;
  background: #d1fae5;
  border: 2px solid #10b981;
  border-radius: 8px;
  color: #065f46;
  text-align: center;
  margin-bottom: 20px;
}

/* Progress Bar (Multi-step) */
.form-progress {
  margin-bottom: 40px;
  padding: 24px;
  background: #f9fafb;
  border-radius: 12px;
}

.form-progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.form-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 0.3s ease;
}

.form-progress-text {
  margin-top: 8px;
  font-size: 14px;
  color: #6b7280;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .dynamic-form-header {
    padding: 32px 24px;
  }

  .dynamic-form-body {
    padding: 24px;
  }

  .dynamic-form-title {
    font-size: 28px;
  }

  .form-section-title {
    font-size: 20px;
  }
}
