/*--------------------------------------------------------------
# Form Wizard Styles
--------------------------------------------------------------*/

/* Horizontal Wizard Steps */
.wizard-steps {
  display: flex;
  justify-content: space-between;
  position: relative;

  &::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
  }
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;

  &-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--muted-color);
    transition: all var(--transition-base);
  }

  &-number {
    font-size: 0.875rem;
  }

  &-check {
    display: none;
  }

  &-label {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--muted-color);
    font-weight: 500;
    transition: color var(--transition-base);
  }

  &.active {
    .wizard-step-icon {
      background: var(--accent-color);
      border-color: var(--accent-color);
      color: var(--contrast-color);
    }

    .wizard-step-label {
      color: var(--accent-color);
    }
  }

  &.completed {
    .wizard-step-icon {
      background: var(--success-color);
      border-color: var(--success-color);
      color: var(--contrast-color);
    }

    .wizard-step-number {
      display: none;
    }

    .wizard-step-check {
      display: block;
    }

    .wizard-step-label {
      color: var(--success-color);
    }
  }
}

/* Wizard Content */
.wizard-content {
  display: none;
  padding: 1.5rem 0;

  &.active {
    display: block;
  }
}

/* Wizard Actions */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

/* Wizard Finish Icon */
.wizard-finish-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-color), transparent 90%);
  color: var(--accent-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;

  &.success {
    background: color-mix(in srgb, var(--success-color), transparent 90%);
    color: var(--success-color);
  }
}

/* Vertical Wizard */
.wizard-steps-vertical {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 1rem;

  &::before {
    content: '';
    position: absolute;
    left: calc(1rem + 15px);
    top: 30px;
    bottom: 30px;
    width: 2px;
    background: var(--border-color);
  }
}

.wizard-step-v {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  position: relative;

  &-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--muted-color);
    transition: all var(--transition-base);
    z-index: 1;
  }

  &-content {
    flex: 1;
  }

  &-title {
    font-weight: 600;
    color: var(--muted-color);
    font-size: 0.9375rem;
    transition: color var(--transition-base);
  }

  &-desc {
    font-size: 0.8125rem;
    color: var(--light-color);
  }

  &.active {
    .wizard-step-v-icon {
      background: var(--accent-color);
      border-color: var(--accent-color);
      color: var(--contrast-color);
    }

    .wizard-step-v-title {
      color: var(--heading-color);
    }
  }

  &.completed {
    .wizard-step-v-icon {
      background: var(--success-color);
      border-color: var(--success-color);
      color: var(--contrast-color);
    }

    .wizard-step-v-title {
      color: var(--success-color);
    }
  }
}

.wizard-content-v {
  display: none;

  &.active {
    display: block;
  }
}

/* Plan Cards */
.plan-card {
  position: relative;

  .btn-check:checked + .plan-card-label {
    border-color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color), transparent 95%);
  }
}

.plan-card-label {
  display: block;
  padding: 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  height: 100%;

  &:hover {
    border-color: var(--accent-color);
  }

  &.featured {
    border-color: var(--accent-color);
  }
}

.plan-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-color);
  color: var(--contrast-color);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.plan-card-header {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);

  h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
  }
}

.plan-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--heading-color);

  small {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--muted-color);
  }
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;

  li {
    padding: 0.375rem 0;
    font-size: 0.875rem;

    i {
      margin-right: 0.5rem;
    }
  }
}

/* Order Summary */
.order-summary {
  background: var(--background-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.order-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.order-total {
  padding-top: 1rem;
}

/* Progress Bar Wizard */
.wizard-progress {
  margin-bottom: 2rem;
}

.wizard-content-p {
  display: none;
  min-height: 200px;

  &.active {
    display: block;
  }
}

/* Pills Wizard */
.wizard-pills {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;

  .nav-item {
    flex: 1;
    min-width: 120px;
    max-width: 200px;
  }

  .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-color);
    color: var(--muted-color);
    width: 100%;
    transition: all var(--transition-base);

    &:hover:not(:disabled) {
      border-color: var(--accent-color);
    }

    &.active {
      background: var(--accent-color);
      border-color: var(--accent-color);
      color: var(--contrast-color);

      .wizard-pill-number {
        background: rgba(255, 255, 255, 0.2);
        color: var(--contrast-color);
      }
    }

    &.completed {
      border-color: var(--success-color);
      color: var(--success-color);

      .wizard-pill-number {
        background: var(--success-color);
        color: var(--contrast-color);
      }
    }

    &:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }
  }
}

.wizard-pill-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--background-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.wizard-pill-text {
  font-weight: 500;
  font-size: 0.875rem;
}

/* Icon Steps Wizard */
.wizard-icon-steps {
  display: flex;
  justify-content: space-between;
  position: relative;

  &::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--border-color);
  }
}

.wizard-icon-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;

  &-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--muted-color);
    transition: all var(--transition-base);
  }

  &-label {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--muted-color);
    font-weight: 500;
    text-align: center;
  }

  &.active {
    .wizard-icon-step-icon {
      background: var(--accent-color);
      border-color: var(--accent-color);
      color: var(--contrast-color);
    }

    .wizard-icon-step-label {
      color: var(--accent-color);
    }
  }

  &.completed {
    .wizard-icon-step-icon {
      background: var(--success-color);
      border-color: var(--success-color);
      color: var(--contrast-color);
    }

    .wizard-icon-step-label {
      color: var(--success-color);
    }
  }
}

.wizard-content-i {
  display: none;
  padding: 1.5rem 0;

  &.active {
    display: block;
  }
}

/* Responsive */
@media (max-width: 767.98px) {
  .wizard-steps {
    flex-wrap: wrap;
    gap: 1rem;

    &::before {
      display: none;
    }
  }

  .wizard-step {
    flex: 0 0 calc(50% - 0.5rem);
  }

  .wizard-icon-steps {
    flex-wrap: wrap;
    gap: 1rem;

    &::before {
      display: none;
    }
  }

  .wizard-icon-step {
    flex: 0 0 calc(33.333% - 0.75rem);
  }

  .wizard-pills .nav-item {
    min-width: 100%;
    max-width: 100%;
  }
}
