/* Wizard Layout - sidebar + main content */
.wizard-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* Wizard Sidebar */
.wizard-sidebar {
  position: sticky;
  top: 2rem;
  flex-shrink: 0;
  width: 14rem;
  padding: 1rem 0;
}

.wizard-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Sidebar Item */
.wizard-sidebar__item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  opacity: 0.35;
  transition: opacity 0.2s ease, background-color 0.15s ease;
  cursor: default;
  user-select: none;
}

.wizard-sidebar__item--active {
  opacity: 1;
  background-color: var(--c-brand-highlight);
}

.wizard-sidebar__item--completed {
  opacity: 1;
}

.wizard-sidebar__item--reachable {
  opacity: 1;
}

.wizard-sidebar__item--clickable {
  cursor: pointer;
}

.wizard-sidebar__item--clickable:hover {
  background-color: var(--c-brand-highlight);
}

/* Marker (numbered circle / checkmark) */
.wizard-sidebar__marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  background-color: var(--c-border);
  color: var(--c-base-subtitle-text);
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.wizard-sidebar__item--active .wizard-sidebar__marker {
  background-color: var(--c-brand);
  color: var(--c-brand-text);
}

.wizard-sidebar__item--completed .wizard-sidebar__marker {
  background-color: var(--c-success);
  color: white;
}

.wizard-sidebar__check {
  width: 0.875rem;
  height: 0.875rem;
}

/* Label */
.wizard-sidebar__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--c-base-subtitle-text);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.wizard-sidebar__item--active .wizard-sidebar__label {
  color: var(--c-base-text);
  font-weight: 600;
}

.wizard-sidebar__item--completed .wizard-sidebar__label {
  color: var(--c-base-text);
}


/* Wizard Main (content area next to sidebar) */
.wizard-main {
  flex: 1;
  min-width: 0;
}

/* Wizard Content Area */
.wizard-content {
  min-height: 20rem;
  padding: 0 3.125rem;
}

.wizard-content__step {
  display: none;
}

.wizard-content__step--active {
  display: block;
  animation: wizardFadeIn 0.3s ease;
}

@keyframes wizardFadeIn {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Wizard Actions (Top Navigation) */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--c-border);
}

.wizard-actions__left {
  display: flex;
  gap: 0.75rem;
}

.wizard-actions__right {
  display: flex;
  gap: 0.75rem;
}

/* Optional Section Pattern */
.wizard-optional-section {
  padding: 1.5rem;
  background-color: var(--c-app-bg);
  border: 1px solid var(--c-border);
  border-radius: 0.75rem;
}

.wizard-optional-section__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wizard-optional-section__toggle-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--c-base-text);
}

.wizard-optional-section__content {
  display: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
}

.wizard-optional-section__content--visible {
  display: block;
  animation: wizardFadeIn 0.3s ease;
}

/* Validation Error Alert */
.wizard-error-alert {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--c-error);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  animation: wizardFadeIn 0.3s ease;
}

.wizard-error-alert__item {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--c-error);
  padding: 0.125rem 0;
}

.wizard-error-alert__item + .wizard-error-alert__item {
  border-top: 1px solid rgba(239, 68, 68, 0.15);
  margin-top: 0.25rem;
  padding-top: 0.375rem;
}

/* Summary Step */
.wizard-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wizard-summary__section {
  padding: 1.25rem;
  background-color: var(--c-app-bg);
  border: 1px solid var(--c-border);
  border-radius: 0.75rem;
}

.wizard-summary__section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.wizard-summary__section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-base-text);
  margin: 0;
}

.wizard-summary__status {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.wizard-summary__status--valid {
  background-color: rgba(34, 197, 94, 0.1);
  color: var(--c-success);
}

.wizard-summary__status--invalid {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--c-error);
}

.wizard-summary__status--optional {
  background-color: var(--c-border);
  color: var(--c-base-subtitle-text);
}

.wizard-summary__content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
}

.wizard-summary__label {
  font-size: 0.8125rem;
  color: var(--c-base-subtitle-text);
}

.wizard-summary__value {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--c-base-text);
}

.wizard-summary__value--empty {
  color: var(--c-base-subtitle-text);
  font-style: italic;
}

/* Visit list in summary */
.wizard-summary__visit-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.wizard-summary__visit-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--c-base-text);
}

.wizard-summary__visit-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.wizard-summary__visit-dot--specific {
  background-color: var(--c-brand);
}

.wizard-summary__visit-dot--recurring {
  background-color: var(--c-brand-secondary);
}

.wizard-summary__visit-dot--medication {
  background-color: var(--c-medication);
}

/* Symptoms list in summary */
.wizard-summary__symptoms-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.wizard-summary__symptom-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--c-base-text);
  padding: 0.375rem 0.5rem;
  background-color: rgba(59, 130, 246, 0.05);
  border-radius: 0.375rem;
}

.wizard-summary__symptom-name {
  flex: 1;
}

.wizard-summary__symptom-badge {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--c-brand);
  padding: 0.125rem 0.375rem;
  background-color: var(--c-brand-highlight);
  border-radius: 0.25rem;
  text-transform: uppercase;
}

/* Summary Timeline Grid */
.summary-timeline {
  margin-top: 1rem;
}

.summary-timeline__grid {
  display: flex;
  border: 1px solid var(--c-border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.summary-timeline__pinned {
  flex-shrink: 0;
  width: 12rem;
  border-right: 2px solid var(--c-border);
  background: var(--c-app-bg);
  position: sticky;
  left: 0;
  z-index: 1;
}

.summary-timeline__scroll {
  flex: 1;
  overflow-x: auto;
}

.summary-timeline__corner {
  height: 2rem;
  border-bottom: 1px solid var(--c-border);
}

.summary-timeline__time-corner {
  height: 1.25rem;
  border-bottom: 1px solid var(--c-border);
}

.summary-timeline__day-header {
  height: 2rem;
  font-size: 0.625rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
  font-weight: 600;
  color: var(--c-base-subtitle-text);
}

.summary-timeline__time-header {
  height: 1.25rem;
  font-size: 0.5rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
  color: var(--c-base-subtitle-text);
  font-weight: 500;
}

.summary-timeline__section-header {
  height: 1.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0 0.5rem;
  background: var(--c-border);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  letter-spacing: 0.05em;
  color: var(--c-base-subtitle-text);
}

.summary-timeline__section-spacer {
  height: 1.5rem;
  background: var(--c-border);
}

.summary-timeline__row-label {
  height: 1.75rem;
  font-size: 0.75rem;
  padding: 0 0.5rem;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  color: var(--c-base-text);
}

.summary-timeline__cell {
  height: 1.75rem;
  border-bottom: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
}

.summary-timeline__cell--active {
  background: var(--c-brand);
}

.summary-timeline__cell--clinic_visit {
  background: var(--c-summary-clinic);
}

.summary-timeline__cell--home_visit {
  background: var(--c-summary-home-visit);
}

.summary-timeline__cell--measurement {
  background: var(--c-summary-measurement);
}

.summary-timeline__cell--symptom {
  background: var(--c-summary-symptom);
}

.summary-timeline__cell--med_required {
  background: var(--c-summary-med-required);
}

.summary-timeline__cell--med_optional {
  background: var(--c-summary-med-optional);
}

.summary-timeline__cell--edu_required {
  background: var(--c-summary-edu-required);
}

.summary-timeline__cell--edu_optional {
  background: var(--c-summary-edu-optional);
}
