/* ========================================
   Lead Form - Anfrage Page
   Multi-step wizard for wholesaler matching
   ======================================== */

/* Hero Section */
.anfrage-hero {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  margin-bottom: 2rem;
}

.anfrage-hero .page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #495057;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.trust-signals {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #28a745;
}

.trust-icon {
  font-size: 1.5rem;
  color: #28a745;
}

/* Container */
.anfrage-container {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
}

/* Progress Indicator */
.progress-container {
  margin-bottom: 3rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
  transition: width 0.3s ease;
  width: 16.66%; /* 1/6 for step 1 */
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.progress-step {
  flex: 1;
  text-align: center;
  cursor: default;
  transition: all 0.3s ease;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.step-label {
  display: block;
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 500;
}

.progress-step.active .step-number {
  background: #28a745;
  color: #fff;
  transform: scale(1.1);
}

.progress-step.active .step-label {
  color: #28a745;
  font-weight: 600;
}

.progress-step.completed .step-number {
  background: #20c997;
  color: #fff;
}

.progress-step.completed .step-number::before {
  content: '✓';
}

/* Form Steps */
.form-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.form-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.step-description {
  font-size: 1rem;
  color: #6c757d;
  margin-bottom: 2rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-label.required::after {
  content: '*';
  color: #dc3545;
  margin-left: 0.25rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: #fff;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.form-control:disabled,
.form-control[readonly] {
  background: #f8f9fa;
  cursor: not-allowed;
}

.form-control.error {
  border-color: #dc3545;
}

.form-control.error:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-error {
  display: none;
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-error.visible {
  display: block;
}

.form-hint {
  display: block;
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* Form Row (for side-by-side fields) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Radio and Checkbox Groups */
.radio-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.75rem 1.25rem;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: #fff;
}

.radio-label:hover,
.checkbox-label:hover {
  border-color: #28a745;
  background: #f8f9fa;
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
  margin-right: 0.5rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #28a745;
}

.radio-label input[type="radio"]:checked + span,
.checkbox-label input[type="checkbox"]:checked + span {
  font-weight: 600;
  color: #28a745;
}

.radio-label:has(input:checked),
.checkbox-label:has(input:checked) {
  border-color: #28a745;
  background: rgba(40, 167, 69, 0.05);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.checkbox-grid .checkbox-label {
  margin: 0;
}

/* Privacy Checkbox */
.privacy-checkbox {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px solid #dee2e6;
  cursor: pointer;
}

.privacy-checkbox input[type="checkbox"] {
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.privacy-checkbox span {
  font-size: 0.9rem;
  color: #495057;
}

.privacy-checkbox a {
  color: #28a745;
  text-decoration: underline;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 2px solid #28a745;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-dropdown.visible {
  display: block;
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid #f8f9fa;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: rgba(40, 167, 69, 0.1);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

/* Position relative for autocomplete parent */
.form-group {
  position: relative;
}

/* Navigation Buttons */
.form-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e9ecef;
}

.btn {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  line-height: 1.5;
}

.btn-primary {
  background: #28a745;
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: #fff;
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
}

.btn-secondary {
  background: #6c757d;
  color: #fff;
}

.btn-secondary:hover:not(:disabled) {
  background: #5a6268;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Success & Error Messages */
.success-message,
.error-message {
  text-align: center;
  padding: 3rem 2rem;
}

.success-icon,
.error-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.success-icon {
  background: #d4edda;
  color: #28a745;
}

.error-icon {
  background: #f8d7da;
  color: #dc3545;
}

.success-message h2,
.error-message h2 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.success-message p,
.error-message p {
  font-size: 1.125rem;
  color: #495057;
  margin-bottom: 1rem;
}

.success-detail {
  font-size: 1rem;
  color: #6c757d;
  margin-top: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .anfrage-hero .page-title {
    font-size: 1.875rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .trust-signals {
    gap: 1rem;
  }

  .anfrage-container {
    padding: 1.5rem;
  }

  .progress-steps {
    gap: 0.25rem;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }

  .step-label {
    font-size: 0.75rem;
  }

  .step-title {
    font-size: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .radio-group {
    flex-direction: column;
    gap: 0.75rem;
  }

  .form-navigation {
    flex-direction: column-reverse;
  }

  .form-navigation .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .anfrage-hero {
    padding: 2rem 1rem;
  }

  .trust-signals {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .progress-steps {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .step-label {
    display: none;
  }

  .progress-step {
    flex: 0 0 auto;
  }
}

/* Print Styles */
@media print {
  .anfrage-hero,
  .progress-container,
  .form-navigation {
    display: none;
  }

  .form-step {
    display: block !important;
  }
}
