/* stage-53-schedule-wizard-deep-polish */

#entryModal[data-action="schedule"][data-mode="create"] .modal-panel {
  width: min(900px, calc(100vw - 28px));
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 18%, var(--glass-border));
  background:
    radial-gradient(circle at 10% -8%, color-mix(in srgb, var(--label-schedule, #5f9073) 13%, transparent), transparent 19rem),
    radial-gradient(circle at 96% 2%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 18rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 76%, transparent), color-mix(in srgb, var(--glass-surface) 96%, transparent));
}

#entryModal[data-action="schedule"][data-mode="create"] .modal-fields {
  gap: clamp(12px, 1.6vw, 18px);
}

.schedule-wizard-shell {
  --wizard-soft: color-mix(in srgb, var(--label-schedule, #5f9073) 12%, transparent);
  gap: clamp(10px, 1.35vw, 14px);
}

.wizard-topline {
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 16%, var(--glass-border));
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, #fff 20%, transparent), transparent 58%),
    radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 12rem),
    color-mix(in srgb, var(--glass-surface) 76%, transparent);
  box-shadow:
    var(--shadow-xs),
    inset 0 1px 0 color-mix(in srgb, #fff 15%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: clamp(12px, 1.6vw, 16px);
}

.wizard-step-title span {
  color: color-mix(in srgb, var(--label-schedule, #5f9073) 72%, var(--muted-strong));
}

.wizard-step-title strong {
  font-size: clamp(1.02rem, 1.45vw, 1.18rem);
  font-weight: 800;
}

.wizard-step-count {
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 14%, var(--glass-border));
  border-radius: 999px;
  background:
    radial-gradient(circle at 24% 0%, color-mix(in srgb, #fff 18%, transparent), transparent 58%),
    color-mix(in srgb, var(--glass-surface) 78%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 13%, transparent);
  padding: 0 12px;
}

.wizard-progress {
  height: 7px;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--glass-border));
  border-radius: 999px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-surface) 78%, transparent), color-mix(in srgb, var(--glass-elevated) 44%, transparent));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent),
    0 10px 22px color-mix(in srgb, var(--primary) 8%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1px;
}

.wizard-progress i {
  min-width: 14px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--primary) 92%, #fff), color-mix(in srgb, var(--label-schedule, #5f9073) 46%, var(--primary)));
  box-shadow: 0 0 18px color-mix(in srgb, var(--primary) 34%, transparent);
}

.wizard-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  gap: clamp(12px, 1.7vw, 16px);
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 16%, var(--glass-border));
  border-radius: 30px;
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--label-schedule, #5f9073) 11%, transparent), transparent 17rem),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, #fff 14%, transparent), transparent 17rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 58%, transparent), color-mix(in srgb, var(--glass-surface) 94%, transparent));
  box-shadow:
    var(--focus-shadow),
    inset 0 1px 0 color-mix(in srgb, #fff 16%, transparent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: clamp(15px, 2vw, 20px);
}

.wizard-card::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, color-mix(in srgb, #fff 16%, transparent), transparent 38%),
    radial-gradient(circle at 96% 0%, color-mix(in srgb, var(--primary) 7%, transparent), transparent 15rem);
  content: "";
  pointer-events: none;
  z-index: -1;
}

.wizard-card-head {
  max-width: 70ch;
  gap: 8px;
}

.wizard-card-head h3 {
  position: relative;
  padding-bottom: 12px;
  color: color-mix(in srgb, var(--primary) 78%, var(--text));
  font-weight: 820;
  text-wrap: balance;
}

.wizard-card-head h3::after {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--label-schedule, #5f9073) 42%, transparent));
  box-shadow: 0 0 18px color-mix(in srgb, var(--primary) 24%, transparent);
  content: "";
}

.wizard-card-head p {
  max-width: 62ch;
  color: var(--muted-strong);
  font-weight: 620;
}

.wizard-step-body {
  gap: clamp(11px, 1.55vw, 15px);
}

.wizard-step-body :where(.schedule-form-grid, .wizard-add-row, .selected-subjects, .lesson-subject-picker, .wizard-subsection, .mentor-group-picker, .music-practice-builder, .sport-day-builder) {
  border: 1px solid color-mix(in srgb, var(--label-schedule, #5f9073) 13%, var(--glass-border));
  border-radius: 24px;
  background:
    radial-gradient(circle at 14% 0%, color-mix(in srgb, #fff 16%, transparent), transparent 58%),
    color-mix(in srgb, var(--glass-surface) 76%, transparent);
  box-shadow: var(--shadow-xs), inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
  padding: clamp(12px, 1.7vw, 16px);
}

.wizard-step-body :where(label) > span,
.wizard-step-body :where(.field-caption) {
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 760;
}

.wizard-chip,
.wizard-option {
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 13%, transparent),
    0 8px 20px color-mix(in srgb, #000 4%, transparent);
}

.wizard-chip:is(:hover, :focus-visible, .selected),
.wizard-option:is(:hover, :focus-visible, .selected) {
  box-shadow:
    0 13px 30px color-mix(in srgb, var(--label-schedule, #5f9073) 14%, transparent),
    var(--focus-glow),
    inset 0 1px 0 color-mix(in srgb, #fff 16%, transparent);
}

.color-choice {
  box-shadow:
    0 0 0 1px color-mix(in srgb, #fff 13%, transparent),
    0 10px 22px color-mix(in srgb, #000 6%, transparent);
}

.color-choice.selected {
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--primary) 82%, #fff),
    0 0 22px color-mix(in srgb, var(--primary) 22%, transparent);
}

.status-toggle {
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 12%, var(--glass-border));
  border-radius: 18px;
  background:
    radial-gradient(circle at 16% 0%, color-mix(in srgb, #fff 15%, transparent), transparent 58%),
    color-mix(in srgb, var(--glass-surface) 76%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
}

.schedule-voice-slot:not(:empty) {
  width: max-content;
  max-width: 100%;
  margin-top: 0;
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 14%, var(--glass-border));
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, #fff 15%, transparent), transparent 58%),
    color-mix(in srgb, var(--glass-surface) 76%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.wizard-actions {
  width: max-content;
  max-width: 100%;
  justify-self: end;
  margin-top: 0;
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 14%, var(--glass-border));
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, #fff 17%, transparent), transparent 58%),
    color-mix(in srgb, var(--glass-surface) 80%, transparent);
  box-shadow:
    var(--focus-shadow),
    inset 0 1px 0 color-mix(in srgb, #fff 13%, transparent);
  padding: 7px;
}

.wizard-actions :where(.action-image-button) {
  width: 50px;
  min-width: 50px;
  height: 50px;
  min-height: 50px;
  border-radius: 16px;
}

.schedule-preview-card {
  border-radius: 30px;
  box-shadow:
    var(--focus-shadow),
    0 18px 46px color-mix(in srgb, var(--schedule-preview-color, var(--label-schedule, #5f9073)) 12%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 15%, transparent);
}

#entryModal[data-action="schedule"][data-mode="create"] .wizard-topline {
  border-radius: 26px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#entryModal[data-action="schedule"][data-mode="create"] .wizard-progress {
  height: 7px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#entryModal[data-action="schedule"][data-mode="create"] .wizard-card {
  border-radius: 30px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

#entryModal[data-action="schedule"][data-mode="create"] .wizard-step-body :where(.schedule-form-grid, .wizard-add-row, .selected-subjects, .lesson-subject-picker, .wizard-subsection, .mentor-group-picker, .music-practice-builder, .sport-day-builder) {
  border-radius: 24px;
}

#entryModal[data-action="schedule"][data-mode="create"] .wizard-actions {
  width: max-content;
  justify-self: end;
}

#entryModal[data-action="schedule"][data-mode="create"] .schedule-preview-card {
  border-radius: 30px;
}

#entryModal[data-action="schedule"] .schedule-wizard-shell {
  --wizard-soft: color-mix(in srgb, var(--label-schedule, #5f9073) 12%, transparent);
  gap: clamp(10px, 1.35vw, 14px);
}

#entryModal[data-action="schedule"] .schedule-wizard-shell .wizard-topline {
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 16%, var(--glass-border));
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, #fff 20%, transparent), transparent 58%),
    radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 12rem),
    color-mix(in srgb, var(--glass-surface) 76%, transparent);
  box-shadow:
    var(--shadow-xs),
    inset 0 1px 0 color-mix(in srgb, #fff 15%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#entryModal[data-action="schedule"] .schedule-wizard-shell .wizard-progress {
  height: 7px;
  border-color: color-mix(in srgb, var(--primary) 12%, var(--glass-border));
  border-radius: 999px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--glass-surface) 78%, transparent), color-mix(in srgb, var(--glass-elevated) 44%, transparent));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent),
    0 10px 22px color-mix(in srgb, var(--primary) 8%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#entryModal[data-action="schedule"] .schedule-wizard-shell .wizard-card {
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 16%, var(--glass-border));
  border-radius: 30px;
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--label-schedule, #5f9073) 11%, transparent), transparent 17rem),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, #fff 14%, transparent), transparent 17rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 58%, transparent), color-mix(in srgb, var(--glass-surface) 94%, transparent));
  box-shadow:
    var(--focus-shadow),
    inset 0 1px 0 color-mix(in srgb, #fff 16%, transparent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

#entryModal[data-action="schedule"] .schedule-wizard-shell .wizard-step-body :where(.schedule-form-grid, .wizard-add-row, .selected-subjects, .lesson-subject-picker, .wizard-subsection, .mentor-group-picker, .music-practice-builder, .sport-day-builder) {
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 13%, var(--glass-border));
  border-radius: 24px;
  background:
    radial-gradient(circle at 14% 0%, color-mix(in srgb, #fff 16%, transparent), transparent 58%),
    color-mix(in srgb, var(--glass-surface) 76%, transparent);
  box-shadow: var(--shadow-xs), inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
}

#entryModal[data-action="schedule"] .wizard-step-body .schedule-form-grid,
#entryModal[data-action="schedule"] .wizard-step-body .wizard-add-row,
#entryModal[data-action="schedule"] .wizard-step-body .selected-subjects,
#entryModal[data-action="schedule"] .wizard-step-body .lesson-subject-picker,
#entryModal[data-action="schedule"] .wizard-step-body .wizard-subsection,
#entryModal[data-action="schedule"] .wizard-step-body .mentor-group-picker,
#entryModal[data-action="schedule"] .wizard-step-body .music-practice-builder,
#entryModal[data-action="schedule"] .wizard-step-body .sport-day-builder {
  border-radius: 24px !important;
}

#entryModal[data-action="schedule"] .schedule-wizard-shell .wizard-actions {
  width: max-content;
  max-width: 100%;
  justify-self: end;
  margin-top: 0;
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 14%, var(--glass-border));
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, #fff 17%, transparent), transparent 58%),
    color-mix(in srgb, var(--glass-surface) 80%, transparent);
  box-shadow:
    var(--focus-shadow),
    inset 0 1px 0 color-mix(in srgb, #fff 13%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 7px;
}

#entryModal[data-action="schedule"] .schedule-wizard-shell .schedule-preview-card {
  border-radius: 30px;
  box-shadow:
    var(--focus-shadow),
    0 18px 46px color-mix(in srgb, var(--schedule-preview-color, var(--label-schedule, #5f9073)) 12%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 15%, transparent);
}

@media (max-width: 760px) {
  #entryModal[data-action="schedule"][data-mode="create"] .modal-panel {
    width: min(100vw - 14px, 620px);
  }

  .wizard-topline {
    border-radius: 23px;
    padding: 12px;
  }

  .wizard-step-count {
    min-height: 30px;
    padding-inline: 10px;
  }

  .wizard-progress {
    height: 6px;
  }

  .wizard-card,
  .schedule-preview-card {
    border-radius: 25px;
    padding: 14px;
  }

  .wizard-card-head h3 {
    font-size: clamp(1.08rem, 5vw, 1.32rem);
  }

  .wizard-step-body :where(.schedule-form-grid, .wizard-add-row, .selected-subjects, .lesson-subject-picker, .wizard-subsection, .mentor-group-picker, .music-practice-builder, .sport-day-builder) {
    border-radius: 22px;
    padding: 12px;
  }

  .schedule-voice-slot:not(:empty) {
    width: 100%;
  }

  .wizard-actions {
    position: sticky;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 5;
    border-radius: 20px;
    padding: 6px;
  }

  .wizard-actions :where(.action-image-button) {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
  }

  #entryModal[data-action="schedule"] .schedule-wizard-shell .wizard-topline {
    border-radius: 23px;
  }

  #entryModal[data-action="schedule"] .schedule-wizard-shell .wizard-card,
  #entryModal[data-action="schedule"] .schedule-wizard-shell .schedule-preview-card {
    border-radius: 25px;
  }

  #entryModal[data-action="schedule"] .schedule-wizard-shell .wizard-step-body :where(.schedule-form-grid, .wizard-add-row, .selected-subjects, .lesson-subject-picker, .wizard-subsection, .mentor-group-picker, .music-practice-builder, .sport-day-builder) {
    border-radius: 22px;
  }

  #entryModal[data-action="schedule"] .wizard-step-body .schedule-form-grid,
  #entryModal[data-action="schedule"] .wizard-step-body .wizard-add-row,
  #entryModal[data-action="schedule"] .wizard-step-body .selected-subjects,
  #entryModal[data-action="schedule"] .wizard-step-body .lesson-subject-picker,
  #entryModal[data-action="schedule"] .wizard-step-body .wizard-subsection,
  #entryModal[data-action="schedule"] .wizard-step-body .mentor-group-picker,
  #entryModal[data-action="schedule"] .wizard-step-body .music-practice-builder,
  #entryModal[data-action="schedule"] .wizard-step-body .sport-day-builder {
    border-radius: 22px !important;
  }

  #entryModal[data-action="schedule"] .schedule-wizard-shell .wizard-actions {
    position: sticky;
    right: 0;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 6;
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wizard-topline,
  .wizard-progress i,
  .wizard-card,
  .wizard-chip,
  .wizard-option,
  .wizard-actions,
  .schedule-preview-card {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
