/* stage-55-schedule-wizard-branch-parity */

#entryModal[data-action="schedule"] {
  --wizard-branch-surface: color-mix(in srgb, var(--glass-surface) 82%, transparent);
  --wizard-branch-elevated: color-mix(in srgb, var(--glass-elevated) 64%, transparent);
  --wizard-branch-border: color-mix(in srgb, var(--label-schedule, #5f9073) 15%, var(--glass-border));
}

#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step] {
  display: grid;
  gap: clamp(12px, 1.6vw, 18px);
}

#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step] > :is(
  .schedule-form-grid,
  .wizard-add-row,
  .wizard-option-grid,
  .wizard-chip-row,
  .selected-subjects,
  .lesson-subject-picker,
  .wizard-subsection,
  .mentor-group-picker,
  .music-practice-builder,
  .sport-day-builder
) {
  border-color: var(--wizard-branch-border);
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, #fff 18%, transparent), transparent 60%),
    linear-gradient(145deg, var(--wizard-branch-elevated), var(--wizard-branch-surface));
  box-shadow:
    0 12px 30px color-mix(in srgb, #000 5%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 13%, transparent);
}

#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="basic"] .schedule-form-grid,
#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="period"] .schedule-form-grid,
#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="time"] .schedule-form-grid,
#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="place"] .schedule-form-grid,
#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="location"] .schedule-form-grid {
  gap: clamp(12px, 1.7vw, 16px);
}

#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="details"] .schedule-form-grid,
#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step="details"] .schedule-form-grid,
#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step="music-details"] .schedule-form-grid,
#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step="mentor-details"] .schedule-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: clamp(12px, 1.8vw, 18px);
}

#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="reminder"] .wizard-option-grid,
#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="long-break"] .wizard-option-grid,
#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="choice"] .wizard-option-grid,
#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step="class-kind"] .wizard-option-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="reminder"] .wizard-option,
#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="long-break"] .wizard-option,
#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="choice"] .wizard-option,
#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step="class-kind"] .wizard-option {
  min-height: 52px;
  justify-content: flex-start;
  border-radius: 18px;
  padding-inline: 16px;
  text-align: left;
}

#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step="preview"] {
  gap: 14px;
}

#entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step="preview"] .schedule-preview-card,
#entryModal[data-action="schedule"] .schedule-wizard-shell .schedule-preview-card {
  border-radius: 30px;
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--schedule-preview-color, var(--label-schedule, #5f9073)) 15%, transparent), transparent 18rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 70%, transparent), color-mix(in srgb, var(--glass-surface) 94%, transparent));
  box-shadow:
    0 22px 54px color-mix(in srgb, var(--schedule-preview-color, var(--label-schedule, #5f9073)) 11%, transparent),
    var(--focus-shadow),
    inset 0 1px 0 color-mix(in srgb, #fff 15%, transparent);
}

#entryModal[data-action="schedule"] .wizard-step-body .section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
}

#entryModal[data-action="schedule"] .wizard-step-body .section-title-row .button {
  min-height: 38px;
  border-radius: 999px;
  padding-inline: 14px;
}

#entryModal[data-action="schedule"] .wizard-step-body .empty-state.focus-task-empty {
  min-height: 54px;
  display: grid;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 11%, var(--glass-border));
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, #fff 16%, transparent), transparent 58%),
    color-mix(in srgb, var(--glass-surface) 72%, transparent);
  color: var(--muted-strong);
  font-weight: 650;
  padding: 14px 16px;
}

#entryModal[data-action="schedule"] .wizard-step-body .schedule-color-row {
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 10%, var(--glass-border));
  border-radius: 22px;
  background: color-mix(in srgb, var(--glass-surface) 54%, transparent);
  padding: 10px;
}

#entryModal[data-action="schedule"] .wizard-step-body .color-choice {
  width: 42px;
  height: 42px;
}

#entryModal[data-action="schedule"] .wizard-step-body .status-toggle {
  width: min(100%, 430px);
  min-height: 56px;
}

#entryModal[data-action="schedule"] .wizard-step-body .wizard-lesson,
#entryModal[data-action="schedule"] .wizard-step-body .wizard-person-row {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 12%, var(--glass-border));
}

#entryModal[data-action="schedule"] .wizard-step-body .wizard-lesson > .schedule-form-grid,
#entryModal[data-action="schedule"] .wizard-step-body .wizard-person-row > .schedule-form-grid {
  margin-top: 12px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--glass-surface) 52%, transparent);
  padding: 12px;
}

#entryModal[data-action="schedule"] .wizard-step-body .wizard-person-row > .icon-action,
#entryModal[data-action="schedule"] .wizard-step-body .wizard-lesson > .item-actions {
  margin-top: 10px;
}

#entryModal[data-action="schedule"] .wizard-step-body .wizard-chip-row {
  gap: 9px;
}

#entryModal[data-action="schedule"] .wizard-step-body .wizard-option-grid {
  gap: 10px;
}

#entryModal[data-action="schedule"] .wizard-step-body .wizard-chip {
  min-height: 42px;
}

@media (max-width: 760px) {
  #entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="basic"] .schedule-form-grid,
  #entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="period"] .schedule-form-grid,
  #entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="time"] .schedule-form-grid,
  #entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="details"] .schedule-form-grid,
  #entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step="details"] .schedule-form-grid,
  #entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step="music-details"] .schedule-form-grid,
  #entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step="mentor-details"] .schedule-form-grid,
  #entryModal[data-action="schedule"] .wizard-step-body .wizard-lesson > .schedule-form-grid,
  #entryModal[data-action="schedule"] .wizard-step-body .wizard-person-row > .schedule-form-grid {
    grid-template-columns: 1fr;
  }

  #entryModal[data-action="schedule"] .wizard-step-body .section-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  #entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="reminder"] .wizard-option-grid,
  #entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="long-break"] .wizard-option-grid,
  #entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step*="choice"] .wizard-option-grid,
  #entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step="class-kind"] .wizard-option-grid {
    grid-template-columns: 1fr;
  }

  #entryModal[data-action="schedule"] .wizard-step-body .schedule-color-row {
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #entryModal[data-action="schedule"] .wizard-step-body[data-schedule-step] > *,
  #entryModal[data-action="schedule"] .wizard-step-body .wizard-chip,
  #entryModal[data-action="schedule"] .wizard-step-body .wizard-option,
  #entryModal[data-action="schedule"] .wizard-step-body .color-choice {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
