/*
 * Campaign Wizard Stylesheet
 *
 * Single-column layout with top progress bar for the 3-step campaign wizard.
 */

/* ============================================
   Wizard Container
   ============================================ */

.wizard-container {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 8rem);
}

/* ============================================
   Progress Bar (horizontal top bar)
   ============================================ */

.wizard-progress-bar {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-gray-200);
  background-color: var(--color-white);
  border-radius: 0.5rem 0.5rem 0 0;
}

.wizard-progress-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.wizard-progress-item {
  display: flex;
  align-items: center;
}

/* Connector line between steps */
.wizard-progress-connector {
  width: 4rem;
  height: 2px;
  background-color: var(--color-gray-200);
  margin: 0 0.5rem;
}

.wizard-progress-connector--active {
  background-color: var(--color-primary);
}

/* Step link / static container */
.wizard-progress-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.15s ease;
}

.wizard-progress-step:hover {
  background-color: var(--color-gray-50);
}

.wizard-progress-step--static {
  cursor: default;
}

.wizard-progress-step--static:hover {
  background-color: transparent;
}

.wizard-progress-step--active:hover {
  background-color: transparent;
}

/* Step dot indicators */
.wizard-progress-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.wizard-progress-dot--active {
  background-color: var(--color-primary);
  color: white;
}

.wizard-progress-dot--completed {
  background-color: #22c55e;
  color: white;
}

.wizard-progress-dot--pending {
  background-color: var(--color-gray-200);
  color: var(--color-ink-dark);
}

.wizard-progress-dot--disabled {
  background-color: var(--color-gray-200);
  color: #9ca3af;
}

/* Step label */
.wizard-progress-label {
  font-size: 0.8125rem;
  color: var(--color-ink-dark);
  white-space: nowrap;
}

.wizard-progress-step--active .wizard-progress-label {
  color: var(--color-primary);
  font-weight: 600;
}

/* ============================================
   Step Content Area
   ============================================ */

.wizard-content {
  flex: 1;
  min-width: 0;
  background-color: var(--color-white);
}

.wizard-step-content {
  padding: 1.5rem;
  max-width: 48rem;
  margin: 0 auto;
}

/* ============================================
   Footer Navigation
   ============================================ */

.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-gray-200);
  background-color: var(--color-white);
  border-radius: 0 0 0.5rem 0.5rem;
}

/* ============================================
   Step Transitions
   ============================================ */

turbo-frame#wizard_step {
  display: block;
  min-height: 300px;
}

/* ============================================
   Tag Pills
   ============================================ */

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.15s ease;
  user-select: none;
}

.tag-pill--inactive {
  background-color: var(--color-gray-100);
  color: var(--color-ink-dark);
  border: 1px solid var(--color-gray-200);
}

.tag-pill--inactive:hover {
  background-color: var(--color-gray-200);
}

.tag-pill--active {
  background-color: var(--color-primary);
  color: white;
  border: 1px solid var(--color-primary);
}

/* ============================================
   Preset Cards
   ============================================ */

.preset-card {
  border: 2px solid var(--color-gray-200);
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.15s ease;
  background-color: var(--color-white);
}

.preset-card:hover {
  border-color: var(--color-gray-300);
  background-color: var(--color-gray-50);
}

.preset-card--selected {
  border-color: var(--color-primary);
  background-color: #fff7ed;
}

.preset-card--selected:hover {
  border-color: var(--color-primary);
  background-color: #fff7ed;
}

/* ============================================
   Budget Breakdown Bar
   ============================================ */

.budget-bar {
  display: flex;
  height: 1.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: var(--color-gray-100);
}

.budget-bar-segment {
  height: 100%;
  min-width: 0;
  transition: width 0.3s ease;
}

.budget-bar-seller {
  background-color: var(--color-orange-800);
}

.budget-bar-manager {
  background-color: var(--color-orange-400);
}

.budget-detail-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  border: 1px solid var(--color-gray-200);
  border-radius: 0.5rem;
  background-color: var(--color-white);
}

.budget-detail-card-seller {
  border-left: 2px solid var(--color-orange-800);
}

.budget-detail-card-manager {
  border-left: 2px solid var(--color-orange-400);
}

.budget-dot-seller {
  background-color: var(--color-orange-800);
}

.budget-dot-manager {
  background-color: var(--color-orange-400);
}

.budget-total-amount {
  color: var(--color-orange-800);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .wizard-progress-bar {
    padding: 1rem;
    overflow-x: auto;
  }

  .wizard-progress-list {
    gap: 0;
    min-width: max-content;
  }

  .wizard-progress-connector {
    width: 2rem;
  }

  .wizard-progress-label {
    font-size: 0.75rem;
  }

  .wizard-step-content {
    padding: 1rem;
  }

  .wizard-footer {
    padding: 1rem;
  }
}
