/* ========================================
   Intake Form Specific Styles
   ======================================== */

.form-hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: var(--white);
  padding: 3rem 0;
}

.form-hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.form-hero-content h1 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.form-hero-text {
  color: var(--text-on-navy-muted);
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.form-steps {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.form-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-on-navy-muted);
  font-size: 0.9375rem;
  font-weight: 600;
}

.step-icon {
  width: 36px;
  height: 36px;
  background: rgba(241, 204, 1, 0.2);
  color: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  border: 2px solid var(--gold);
}

.intake-form-section {
  background: var(--mist);
  padding: 4rem 0;
}

.form-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 3rem;
}

@media (max-width: 768px) {
  .form-container {
    padding: 1.5rem;
  }
}

.intake-form {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.form-section {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  background: var(--white);
  transition: all 0.3s ease;
}

.form-section:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}

.section-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-light);
}

.section-number {
  width: 48px;
  height: 48px;
  background: var(--gold);
  color: var(--navy-900);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  flex-shrink: 0;
}

.section-header h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  color: var(--navy-700);
}

.section-header p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

.form-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.form-field label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field input[type="number"],
.form-field select,
.form-field textarea {
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: var(--white);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(241, 204, 1, 0.15);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--gray-300);
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.form-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23333' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Radio and Checkbox Groups */
.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
}

.radio-label:hover,
.checkbox-label:hover {
  background: var(--mist);
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.radio-label span,
.checkbox-label span {
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.4;
}

/* Form Agreement */
.form-agreement {
  background: var(--mist);
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.agreement-label {
  font-size: 0.9375rem;
  line-height: 1.6;
}

.agreement-label input[type="checkbox"] {
  margin-top: 0.25rem;
}

/* Form Actions */
.form-actions {
  text-align: center;
  padding-top: 2rem;
}

.btn-submit-large {
  padding: 1.125rem 3rem;
  background: var(--navy-700);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  font-family: 'Merriweather', serif;
}

.btn-submit-large:hover {
  background: var(--navy-900);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-submit-large:active {
  transform: translateY(0);
}

.form-note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Required Field Indicator */
.form-field label:after {
  content: '';
}

.form-field label:has(+ input[required]):after,
.form-field label:has(+ select[required]):after,
.form-field label:has(+ textarea[required]):after {
  color: #e74c3c;
}

/* Form Validation Styles */
.form-field input:invalid:not(:focus):not(:placeholder-shown),
.form-field select:invalid:not(:focus),
.form-field textarea:invalid:not(:focus):not(:placeholder-shown) {
  border-color: #e74c3c;
}

.form-field input:valid:not(:placeholder-shown),
.form-field select:valid,
.form-field textarea:valid:not(:placeholder-shown) {
  border-color: #27ae60;
}

/* Loading State */
.btn-submit-large.loading {
  opacity: 0.7;
  cursor: not-allowed;
  position: relative;
}

.btn-submit-large.loading:after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  right: 20px;
  margin-top: -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

/* Success Message */
.success-message {
  background: #27ae60;
  color: white;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  margin-bottom: 2rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Error Message */
.error-message {
  background: #e74c3c;
  color: white;
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .form-hero-content h1 {
    font-size: 1.75rem;
  }
  
  .form-steps {
    gap: 1rem;
  }
  
  .form-step {
    font-size: 0.875rem;
  }
  
  .step-icon {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .section-number {
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
  }
}
