/**
 * Selection Wizard Component - REWRITTEN
 * Node ID: 100-65162
 * Based on Figma design specs
 *
 * Layout:
 * - Container: 1440px max-width with 240px padding
 * - Title: 44px Bold, center aligned
 * - Step card: 1440px width, 80px padding top, 60px padding bottom
 * - Selection items: 281×281px, 24px gap
 * - Step badge: 80px circle, positioned -39px from top
 */

/* =============================================
 * WIZARD SECTION CONTAINER
 * ============================================= */

.wizard-section {
  position: relative;
  width: 100%;
  padding: 0 240px 80px; /* Match header padding */
}

.wizard-section__container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 60px; /* Gap from Figma */
}

/* =============================================
 * MAIN TITLE
 * Node ID: 100-65164
 * ============================================= */

.wizard-section__title {
  font-family: var(--font-primary);
  font-size: 44px;
  font-weight: 700; /* Bold */
  line-height: 1.4;
  color: #252525;
  text-align: center;
  margin: 0;
  max-width: 700px; /* Limit width to force line break */
  margin-left: auto;
  margin-right: auto;
}

/* =============================================
 * STEP CARD WRAPPER
 * Node ID: 100-65165-166
 * ============================================= */

.wizard__step-wrapper {
  position: relative;
  width: 100%;
}

.wizard__step-card {
  position: relative;
  width: 1440px;
  max-width: 100%;
  margin: 0 auto;
  background: var(--color-bg-white);
  border: 1px solid #D1D1D1;
  border-radius: 16px;
  padding: 80px 122px 60px; /* Top, horizontal, bottom from Figma */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* =============================================
 * STEP BADGE (Circle with number)
 * Node ID: 100-65172-176
 * ============================================= */

.wizard__step-badge {
  position: absolute;
  top: -39px; /* Half of 80px height to overlap */
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  background: #FFE8DB;
  border-radius: 999px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.wizard__step-badge-number {
  font-family: var(--font-primary);
  font-size: 32px;
  font-weight: 700; /* Bold */
  line-height: 40px;
  color: #F56011;
  text-align: center;
}

/* =============================================
 * QUESTION SECTION
 * Node ID: 100-65167-171
 * ============================================= */

.wizard__question-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  width: 100%;
}

.wizard__question-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  width: 100%;
}

.wizard__question-title {
  font-family: var(--font-primary);
  font-size: 28px;
  font-weight: 700; /* Bold */
  line-height: 40px;
  color: #3D3D3D;
  margin: 0;
}

.wizard__question-description {
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 400; /* Regular */
  line-height: 28px;
  color: #3D3D3D;
  margin: 0;
}

.wizard__question-note {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400; /* Regular */
  font-style: italic;
  line-height: 24px;
  color: #888888;
  margin: 0;
}

/* =============================================
 * SELECTION GRID
 * Node ID: 100-65177
 * ============================================= */

.wizard__selection-grid {
  display: flex;
  gap: 24px; /* Gap between items from Figma */
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
}

/* =============================================
 * SELECTION ITEM
 * Node ID: 100-65178
 * ============================================= */

.wizard__selection-item {
  position: relative;
  width: 281px;
  height: 281px;
  background: #F7F7F8;
  border: 1.5px solid #F7F7F8; /* Same as background - invisible border */
  border-radius: 16px;
  padding: 58.5px 24px 58.5px; /* Top padding 58.5px from Figma, horizontal 24px */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-normal);
}

.wizard__selection-item:hover {
  background: #FFE8DB;
  border-color: #F56011;
}

.wizard__selection-item--selected {
  background: #FFE8DB;
  border-color: #F56011;
}

/* Selection item content */
.wizard__selection-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

.wizard__selection-icon {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wizard__selection-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wizard__selection-label {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 700; /* Bold */
  line-height: 22px;
  color: #3D3D3D;
  text-align: center;
  margin: 0;
}

/* =============================================
 * CHECKBOX INDICATOR
 * Node ID: 100-65189
 * ============================================= */

.wizard__checkbox {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wizard__checkbox img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: var(--transition-normal);
}

.wizard__selection-item--selected .wizard__checkbox img {
  opacity: 1;
}

/* =============================================
 * NAVIGATION BUTTON
 * Node ID: 100-65243-244
 * ============================================= */

.wizard__navigation {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
}

.wizard__button {
  width: 150px;
  border: 5px solid rgba(220, 38, 38, 0.1);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-normal);
}

.wizard__button-inner {
  width: 100%;
  background: linear-gradient(180deg, #FF8F4B 0%, #FF5C00 100%);
  border-radius: 999px;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wizard__button-text {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 700; /* Bold */
  line-height: 22px;
  color: #FFFFFF;
  text-align: center;
}

.wizard__button:hover {
  border-color: rgba(220, 38, 38, 0.2);
  transform: translateY(-2px);
}

.wizard__button:active {
  transform: translateY(0);
}

.wizard__button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* =============================================
 * WIZARD STEPS MANAGEMENT
 * ============================================= */

.wizard__step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.wizard__step--active {
  display: flex;
}

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

/* =============================================
 * RESPONSIVE BEHAVIOR
 * ============================================= */

/* Tablet (768px - 1439px) */
@media (max-width: 1439px) {
  .wizard-section {
    padding: 0 40px 60px; /* Match header tablet padding */
  }

  .wizard__step-card {
    padding: 80px 60px 60px;
  }

  .wizard-section__title {
    font-size: 36px;
    line-height: 1.35;
  }

  .wizard__question-title {
    font-size: 24px;
    line-height: 32px;
  }

  .wizard__question-description {
    font-size: 18px;
    line-height: 26px;
  }

  .wizard__selection-grid {
    gap: 20px;
  }

  .wizard__selection-item {
    width: 240px;
    height: 240px;
    padding: 32px 20px;
  }

  .wizard__selection-icon {
    width: 80px;
    height: 80px;
  }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
  .wizard-section {
    padding: 0 16px 40px; /* Match header mobile padding */
  }

  .wizard-section__container {
    gap: 40px;
  }

  .wizard-section__title {
    font-size: 28px;
    line-height: 1.3;
  }

  .wizard__step-card {
    padding: 60px 20px 40px;
  }

  .wizard__step-badge {
    width: 60px;
    height: 60px;
    top: -30px;
  }

  .wizard__step-badge-number {
    font-size: 24px;
    line-height: 32px;
  }

  .wizard__question-wrapper {
    gap: 20px;
  }

  .wizard__question-header {
    gap: 8px;
  }

  .wizard__question-title {
    font-size: 20px;
    line-height: 28px;
  }

  .wizard__question-description {
    font-size: 16px;
    line-height: 24px;
  }

  .wizard__question-note {
    font-size: 14px;
    line-height: 20px;
  }

  .wizard__selection-grid {
    flex-direction: column;
    gap: 16px;
  }

  .wizard__selection-item {
    width: 100%;
    height: auto;
    min-height: 200px;
    padding: 24px 16px;
  }

  .wizard__selection-icon {
    width: 70px;
    height: 70px;
  }

  .wizard__selection-label {
    font-size: 14px;
    line-height: 20px;
  }

  .wizard__button {
    width: 100%;
  }
}
