/* ================================================================
   MULTI-STEP CONTACT FORM WIZARD - Phase 3
   ================================================================ */

/* ================================================================
   WIZARD CONTAINER
   ================================================================ */

.contact-wizard {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  max-width: 800px;
  margin: 0 auto;
}

/* ================================================================
   PROGRESS INDICATOR
   ================================================================ */

.wizard-progress {
  margin-bottom: 48px;
}

.wizard-progress-bar {
  position: relative;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  margin-bottom: 24px;
  overflow: hidden;
}

.wizard-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
  width: 0%;
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.wizard-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  position: relative;
}

.wizard-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border-light);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.wizard-step-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s;
}

/* Active step */
.wizard-step.active .wizard-step-number {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 0 4px var(--color-primary-alpha-20);
}

.wizard-step.active .wizard-step-label {
  color: var(--color-primary);
  font-weight: 600;
}

/* Completed step */
.wizard-step.completed .wizard-step-number {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.wizard-step.completed .wizard-step-number::after {
  content: '✓';
  position: absolute;
  font-size: 1.2rem;
}

.wizard-step.completed .wizard-step-label {
  color: var(--color-primary);
}

/* ================================================================
   STEP PANELS
   ================================================================ */

.wizard-panel {
  display: none;
  animation: fadeSlideIn 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.wizard-panel.active {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.wizard-panel-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.wizard-panel-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0 0 32px 0;
  line-height: 1.6;
}

/* ================================================================
   FORM FIELDS
   ================================================================ */

.wizard-form-group {
  margin-bottom: 24px;
}

.wizard-form-label {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.wizard-form-label.required::after {
  content: ' *';
  color: #f44336;
}

.wizard-input,
.wizard-select,
.wizard-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.wizard-input:focus,
.wizard-select:focus,
.wizard-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px var(--color-primary-alpha-20);
}

.wizard-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.wizard-input.error,
.wizard-select.error,
.wizard-textarea.error {
  border-color: #f44336;
}

.wizard-error-message {
  display: none;
  color: #f44336;
  font-size: 0.875rem;
  margin-top: 6px;
}

.wizard-input.error ~ .wizard-error-message,
.wizard-select.error ~ .wizard-error-message,
.wizard-textarea.error ~ .wizard-error-message {
  display: block;
}

.wizard-help-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}

/* ================================================================
   PROJECT TYPE CARDS (Step 2)
   ================================================================ */

.wizard-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.wizard-option-card {
  position: relative;
  padding: 20px;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wizard-option-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wizard-option-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-alpha-10);
}

.wizard-option-card.selected::after {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.wizard-option-icon {
  font-size: 32px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.wizard-option-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 0;
}

.wizard-option-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Hidden radio input */
.wizard-option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* ================================================================
   TIMELINE & BUDGET (Step 3)
   ================================================================ */

.wizard-inline-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

/* ================================================================
   REVIEW STEP (Step 4)
   ================================================================ */

.wizard-review-section {
  margin-bottom: 32px;
}

.wizard-review-heading {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-review-heading .material-icons {
  font-size: 24px;
}

.wizard-review-card {
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 20px;
  border-left: 4px solid var(--color-primary);
}

.wizard-review-item {
  margin-bottom: 16px;
}

.wizard-review-item:last-child {
  margin-bottom: 0;
}

.wizard-review-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.wizard-review-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.wizard-review-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  margin-left: 12px;
  transition: opacity 0.2s;
}

.wizard-review-edit:hover {
  opacity: 0.7;
}

.wizard-review-edit .material-icons {
  font-size: 18px;
}

/* ================================================================
   NAVIGATION BUTTONS
   ================================================================ */

.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}

.wizard-btn {
  padding: 12px 32px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
}

.wizard-btn-back {
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border-light);
}

.wizard-btn-back:hover {
  background: var(--bg-elevated);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.wizard-btn-next {
  background: var(--color-primary);
  color: white;
}

.wizard-btn-next:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-primary-alpha-40);
}

.wizard-btn-submit {
  background: var(--color-accent);
  color: white;
}

.wizard-btn-submit:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.wizard-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.wizard-btn .material-icons {
  font-size: 20px;
}

/* ================================================================
   SUCCESS STATE
   ================================================================ */

.wizard-success {
  text-align: center;
  padding: 60px 20px;
}

.wizard-success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: successPop 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.wizard-success-icon .material-icons {
  font-size: 48px;
}

@keyframes successPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.wizard-success-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.wizard-success-message {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto 32px;
}

/* ================================================================
   MOBILE RESPONSIVENESS
   ================================================================ */

@media only screen and (max-width: 768px) {
  .contact-wizard {
    padding: 24px;
  }

  .wizard-steps {
    gap: 4px;
  }

  .wizard-step-number {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .wizard-step-label {
    font-size: 0.75rem;
  }

  .wizard-panel-title {
    font-size: 1.5rem;
  }

  .wizard-options-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wizard-inline-fields {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .wizard-actions {
    flex-direction: column-reverse;
    gap: 12px;
  }

  .wizard-btn {
    width: 100%;
    justify-content: center;
  }
}

@media only screen and (max-width: 480px) {
  .wizard-step-label {
    display: none;
  }

  .wizard-step-number {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }
}

/* ================================================================
   DARK MODE ADJUSTMENTS
   ================================================================ */

[data-theme="dark"] .wizard-option-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .wizard-btn-next:hover {
  box-shadow: 0 4px 12px rgba(63, 81, 181, 0.5);
}

/* ================================================================
   LOADING STATE
   ================================================================ */

.wizard-loading {
  position: relative;
  pointer-events: none;
}

.wizard-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 3px solid var(--color-primary-alpha-20);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
  .wizard-panel,
  .wizard-step-number,
  .wizard-btn,
  .wizard-option-card,
  .wizard-success-icon {
    animation: none;
    transition: none;
  }

  .wizard-option-card:hover,
  .wizard-btn:hover {
    transform: none;
  }
}
