/*
 * Partner Wizard Styles
 *
 * Extends the generic right-panel component with wizard-specific styling.
 * See _right_panel.css for base panel/backdrop styles.
 *
 * The wizard includes:
 * - Vertical stepper sidebar
 * - Multi-step form with progress indicators
 * - Form grid layouts
 */

/* ========================================
   WIZARD MODAL - Specific overrides
   ======================================== */

/* Make modal body flexbox for wizard layout */
.wizard-modal .modal-body {
  flex: 1;
  min-height: 0;
  padding: 0;
  display: flex;
}

/* ========================================
   WIZARD LAYOUT - Sidebar + Content
   ======================================== */

.wizard-container {
  display: flex;
  width: 100%;
  flex: 1;
  min-height: 0;
  margin-top: 60px; /* Top spacing (moved from padding-top on parent) */
}

.wizard-sidebar {
  width: 280px;
  background-color: var(--fluent-gray-5);
  border-right: 1px solid var(--fluent-gray-20);
  padding: var(--fluent-space-2xl);
  flex-shrink: 0;
}

.wizard-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* overflow removed to allow wizard-body to scroll */
  background-color: var(--fluent-white);
}

/* Wizard error container - must not disrupt flex chain */
#wizard_errors {
  flex-shrink: 0;
  min-height: 0;
}

#wizard_errors:empty {
  display: none;  /* Collapse when no errors */
}

.wizard-header {
  padding: var(--fluent-space-2xl) var(--fluent-space-2xl) var(--fluent-space-lg);
  border-bottom: 1px solid var(--fluent-gray-20);
  background-color: var(--fluent-white);
  flex-shrink: 0;
}

.wizard-header h2 {
  margin: 0;
  font-size: var(--fluent-font-size-xl);
  font-weight: var(--fluent-font-weight-bold);
  color: var(--fluent-gray-100);
}

.wizard-header p {
  margin: var(--fluent-space-sm) 0 0;
  font-size: var(--fluent-font-size-sm);
  color: var(--fluent-gray-70);
  line-height: 1.5;
}

.wizard-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--fluent-space-2xl);
  background-color: var(--fluent-white);
}

.wizard-footer {
  padding: var(--fluent-space-lg) var(--fluent-space-2xl);
  border-top: 1px solid var(--fluent-gray-20);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--fluent-white);
  flex-shrink: 0;
}

/* ========================================
   VERTICAL STEPPER - Progress indicator
   ======================================== */

.wizard-stepper {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wizard-step-item {
  position: relative;
  padding-bottom: var(--fluent-space-2xl);
}

.wizard-step-item:last-child {
  padding-bottom: 0;
}

/* Connector line between steps */
.wizard-step-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background-color: var(--fluent-gray-30);
}

.wizard-step-indicator {
  display: flex;
  align-items: center;
  gap: var(--fluent-space-md);
}

.wizard-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fluent-font-size-sm);
  font-weight: var(--fluent-font-weight-semibold);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  transition: all var(--fluent-transition-normal);
}

.wizard-step-label {
  font-size: var(--fluent-font-size-md);
  font-weight: var(--fluent-font-weight-medium);
  color: var(--fluent-gray-70);
  transition: color var(--fluent-transition-fast);
}

/* ========================================
   STEP STATES - Upcoming, Current, Complete
   ======================================== */

/* Upcoming Step (default) */
.wizard-step-upcoming .wizard-step-circle {
  background-color: var(--fluent-white);
  border: 2px solid var(--fluent-gray-30);
  color: var(--fluent-gray-60);
}

.wizard-step-upcoming .wizard-step-label {
  color: var(--fluent-gray-60);
}

/* Current Step */
.wizard-step-current .wizard-step-circle {
  background-color: var(--fluent-primary);
  border: 2px solid var(--fluent-primary);
  color: var(--fluent-white);
}

.wizard-step-current .wizard-step-label {
  color: var(--fluent-gray-90);
  font-weight: var(--fluent-font-weight-semibold);
}

/* Completed Step */
.wizard-step-complete .wizard-step-circle {
  background-color: var(--fluent-primary);
  border: 2px solid var(--fluent-primary);
  color: var(--fluent-white);
}

.wizard-step-complete .wizard-step-label {
  color: var(--fluent-gray-70);
}

/* Checkmark for completed steps */
.wizard-step-complete .wizard-step-circle::after {
  content: '✓';
  font-size: 16px;
  font-weight: bold;
}

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

/* ========================================
   WIZARD STEP CONTENT - Show/hide steps
   ======================================== */

.wizard-step {
  display: none;
  flex-direction: column;
}

.wizard-step.wizard-step-active {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  animation: fadeIn 0.3s ease-in;
}

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

/* ========================================
   FORM GRID LAYOUTS - Responsive columns
   ======================================== */

.wizard-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--fluent-space-lg);
}

.wizard-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--fluent-space-md);
}

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

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

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

/* ========================================
   SERVICE PROVIDER TAGS (Step 3 specific)
   ======================================== */

.service-provider-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fluent-space-sm);
  margin-top: var(--fluent-space-md);
}

/* Ordered tags container */
.service-provider-tags-ordered {
  display: flex;
  flex-direction: column;
  gap: var(--fluent-space-sm);
  margin-top: var(--fluent-space-md);
}

.service-provider-tag {
  display: flex;
  align-items: center;
  gap: var(--fluent-space-sm);
  padding: var(--fluent-space-sm) var(--fluent-space-md);
  background-color: var(--fluent-primary-10);
  border: 1px solid var(--fluent-primary-20);
  border-radius: var(--fluent-radius-md);
  font-size: var(--fluent-font-size-sm);
  color: var(--fluent-primary);
}

.service-provider-tag__controls {
  display: flex;
  gap: 2px;
  margin-right: var(--fluent-space-xs);
}

.service-provider-tag__btn {
  background: none;
  border: 1px solid var(--fluent-primary-30);
  border-radius: var(--fluent-radius-sm);
  padding: 2px 6px;
  margin: 0;
  color: var(--fluent-primary);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fluent-transition-fast);
}

.service-provider-tag__btn:hover:not(:disabled) {
  background-color: var(--fluent-primary-20);
  border-color: var(--fluent-primary);
}

.service-provider-tag__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.service-provider-tag__name {
  flex: 1;
  font-weight: var(--fluent-font-weight-medium);
}

.service-provider-tag__remove {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--fluent-primary);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--fluent-transition-fast);
}

.service-provider-tag__remove:hover {
  color: var(--fluent-error);
}

/* ========================================
   FILE UPLOAD DISPLAY
   ======================================== */

.file-upload-display {
  margin-top: var(--fluent-space-md);
  padding: var(--fluent-space-md);
  background-color: var(--fluent-gray-5);
  border: 1px solid var(--fluent-gray-20);
  border-radius: var(--fluent-radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.file-upload-info {
  display: flex;
  align-items: center;
  gap: var(--fluent-space-sm);
}

.file-upload-remove {
  color: var(--fluent-error);
  cursor: pointer;
  text-decoration: none;
  font-size: var(--fluent-font-size-sm);
}

.file-upload-remove:hover {
  text-decoration: underline;
}

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

@media (max-width: 768px) {
  .wizard-sidebar {
    width: 200px;
    padding: var(--fluent-space-lg);
  }

  .wizard-form-row.two-col,
  .wizard-form-row.three-col,
  .wizard-form-row.address-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .wizard-container {
    flex-direction: column;
  }

  .wizard-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--fluent-gray-20);
  }

  .wizard-stepper {
    display: flex;
    gap: var(--fluent-space-md);
  }

  .wizard-step-item {
    padding-bottom: 0;
  }

  .wizard-step-item:not(:last-child)::before {
    display: none;
  }

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