/* ========================================
   Professional Form Components
   Quantique Minds - Enterprise Form Styling
   ======================================== */

/* Form Groups and Layout */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--neutral-700);
  font-weight: 600;
}

/* Input Fields */
.form-input {
  width: 100%;
  padding: var(--space-md);
  background: white;
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-purple);
  box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.1);
}

/* Textarea */
.form-textarea {
  width: 100%;
  padding: var(--space-md);
  background: white;
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--color-purple);
  box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.1);
}

/* Select Dropdown */
.form-select {
  width: 100%;
  padding: var(--space-md);
  background: white;
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
}

/* Checkbox and Radio */
.form-checkbox,
.form-radio {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.form-checkbox input,
.form-radio input {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* Enhanced Form Inputs with Animations */
.form-input-enhanced {
  position: relative;
}

.form-input-enhanced input:focus + .form-label {
  transform: translateY(-20px) scale(0.8);
  color: var(--color-accent);
}

.form-input-enhanced input:focus {
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

/* Form Validation States */
.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.success {
  border-color: var(--color-emerald);
  box-shadow: 0 0 0 3px rgba(6, 95, 70, 0.1);
}

/* Form Help Text */
.form-help {
  font-size: var(--text-sm);
  color: var(--neutral-600);
  margin-top: var(--space-xs);
}

.form-error {
  font-size: var(--text-sm);
  color: #ef4444;
  margin-top: var(--space-xs);
}

/* Contact Form Styling */
.contact-form {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl);
  box-shadow: var(--shadow-glass);
  border: 1px solid rgba(107, 33, 168, 0.1);
}

/* Search Form */
.search-form {
  position: relative;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: var(--space-md) var(--space-3xl) var(--space-md) var(--space-md);
  background: white;
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.search-button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gradient-premium);
  border: none;
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.search-button:hover {
  transform: translateY(-50%) scale(1.1);
}

/* Newsletter Signup */
.newsletter-form {
  display: flex;
  gap: var(--space-md);
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: var(--space-md);
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
}

.newsletter-button {
  padding: var(--space-md) var(--space-xl);
  background: var(--gradient-premium);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
  white-space: nowrap;
}

.newsletter-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Form Steps/Progress */
.form-steps {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-2xl);
}

.form-step {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  color: var(--neutral-500);
  position: relative;
}

.form-step.active {
  color: var(--color-primary);
}

.form-step.completed {
  color: var(--color-emerald);
}

.form-step-number {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--neutral-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
}

.form-step.active .form-step-number {
  background: var(--color-primary);
  color: white;
}

.form-step.completed .form-step-number {
  background: var(--color-emerald);
  color: white;
}

/* File Upload */
.file-upload {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.file-upload input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-upload-label {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  border: 2px dashed var(--neutral-300);
  border-radius: var(--radius-md);
  background: var(--neutral-50);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.file-upload:hover .file-upload-label {
  border-color: var(--color-accent);
  background: rgba(8, 145, 178, 0.05);
}

.file-upload-icon {
  font-size: var(--text-xl);
  color: var(--color-accent);
}

/* Range Slider */
.range-slider {
  width: 100%;
  margin: var(--space-lg) 0;
}

.range-input {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--neutral-200);
  outline: none;
  -webkit-appearance: none;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-premium);
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.range-input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-premium);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-md);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--neutral-300);
  border-radius: 34px;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background: white;
  border-radius: 50%;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--gradient-premium);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

/* Responsive Forms */
@media (max-width: 768px) {
  .newsletter-form {
    flex-direction: column;
  }
  
  .form-steps {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
  
  .contact-form {
    padding: var(--space-2xl);
  }
}