/* Component normalization only. Page layout and course geometry stay in the
   original styles. Scope is the schedule, its dialog and the school picker. */
body.ui-teacher {
  --teacher-control-height: 36px;
  --teacher-control-radius: 8px;
  --teacher-option-radius: 6px;
  --teacher-control-font-size: 14px;
}
body.ui-teacher #prep-schedule-content .btn,
body.ui-teacher #modal-scheduled-lesson .btn,
body.ui-teacher #prep-schedule-content input.input,
body.ui-teacher #modal-scheduled-lesson .input,
body.ui-teacher #context-org-search {
  box-sizing: border-box;
  height: var(--teacher-control-height);
  min-height: var(--teacher-control-height);
  border-radius: var(--teacher-control-radius);
  font-size: var(--teacher-control-font-size);
  line-height: 20px;
  box-shadow: none;
}
body.ui-teacher #modal-scheduled-lesson .input,
body.ui-teacher #context-org-search {
  padding: 7px 12px;
}
body.ui-teacher #context-org-search { padding-right: 36px; }
body.ui-teacher #prep-schedule-content .btn,
body.ui-teacher #modal-scheduled-lesson .btn { padding-top: 7px; padding-bottom: 7px; }
body.ui-teacher #prep-schedule-content wa-select.teacher-standard-select {
  --wa-form-control-height-small: var(--teacher-control-height);
  --wa-form-control-font-size-small: var(--teacher-control-font-size);
  --wa-form-control-border-radius: var(--teacher-control-radius);
}
body.ui-teacher #prep-schedule-content wa-select.teacher-standard-select::part(combobox) {
  height: var(--teacher-control-height);
  min-height: var(--teacher-control-height);
  border-radius: var(--teacher-control-radius);
  box-shadow: none;
}
body.ui-teacher #prep-schedule-content wa-select.teacher-standard-select::part(listbox),
body.ui-teacher .scheduled-select-options,
body.ui-teacher .teacher-org-results {
  padding: 6px;
  border-radius: var(--teacher-control-radius);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px #20263818;
}
body.ui-teacher #prep-schedule-content wa-option,
body.ui-teacher .scheduled-select-options button,
body.ui-teacher .teacher-org-option {
  box-sizing: border-box;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: var(--teacher-option-radius);
  font-size: var(--teacher-control-font-size);
  line-height: 20px;
}
body.ui-teacher .scheduled-select-options button:hover,
body.ui-teacher .scheduled-select-options button:focus-visible,
body.ui-teacher .scheduled-select-options button[aria-selected="true"],
body.ui-teacher .teacher-org-option:hover,
body.ui-teacher .teacher-org-option.is-active,
body.ui-teacher .teacher-org-option[aria-selected="true"],
body.ui-teacher #prep-schedule-content wa-option:state(current),
body.ui-teacher #prep-schedule-content wa-option:state(selected) {
  color: var(--primary);
  background: var(--primary-soft);
}
body.ui-teacher #prep-schedule-content .btn svg,
body.ui-teacher #modal-scheduled-lesson .btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 1.8;
}
body.ui-teacher #prep-schedule-content .btn:focus-visible,
body.ui-teacher #modal-scheduled-lesson .btn:focus-visible,
body.ui-teacher #modal-scheduled-lesson .input:focus-visible,
body.ui-teacher #context-org-search:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

body.ui-teacher #prep-schedule-content .schedule-segmented button {
  border-radius: var(--teacher-control-radius);
  font-size: var(--teacher-control-font-size);
  line-height: 20px;
}
/* The legacy duration rule uses !important; match it only for this component. */
body.ui-teacher #modal-scheduled-lesson .scheduled-duration {
  font-size: var(--teacher-control-font-size) !important;
}

/* Lucide icons use one geometry throughout controls and dialog labels. */
body.ui-teacher .teacher-component-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  vertical-align: -3px;
  stroke-width: 1.8;
}
body.ui-teacher #scheduled-lesson-title .teacher-component-icon,
body.ui-teacher #modal-prep-create h3 .teacher-component-icon,
body.ui-teacher #modal-scheduled-lesson label > .teacher-component-icon,
body.ui-teacher #modal-scheduled-lesson legend > .teacher-component-icon,
body.ui-teacher #modal-scheduled-lesson strong > .teacher-component-icon {
  margin-right: 6px;
  color: var(--primary);
}
body.ui-teacher #scheduled-lesson-class-button { gap: 8px; }
body.ui-teacher #scheduled-lesson-class-button [data-value] {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.ui-teacher #prep-schedule-content wa-select::part(start) { margin-inline-end: 8px; }

/* Empty library content follows the existing schedule empty-state palette. */
body.ui-teacher .canvas-library-empty {
  padding: 56px 24px;
  margin: 16px 0;
  border-radius: 12px;
  background: #f7f8fa;
  text-align: center;
}
body.ui-teacher .canvas-library-empty .canvas-empty-illustration {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 24px;
}
body.ui-teacher .schedule-empty-state h3,
body.ui-teacher .canvas-library-empty h3 {
  margin: 0;
  font-family: "Source Han Sans CN", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text);
}
body.ui-teacher .schedule-empty-state p,
body.ui-teacher .canvas-library-empty p {
  font-family: "Source Han Sans CN", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  max-width: 440px;
  margin: 16px auto 24px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-2);
}
body.ui-teacher .canvas-library-empty .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--teacher-control-height);
  border-radius: var(--teacher-control-radius);
  font-size: var(--teacher-control-font-size);
}
@media (max-width: 540px) {
  body.ui-teacher .canvas-library-empty { padding: 32px 16px; }
}

/* Menu labels share a left edge; selection marks occupy the trailing column. */
body.ui-teacher wa-select.teacher-standard-select wa-option::part(checked-icon) {
  order: 2;
  width: 18px;
  margin-inline-start: 8px;
}
body.ui-teacher .canvas-sort-popover {
  padding: 6px;
  border-radius: var(--teacher-control-radius);
}
body.ui-teacher .canvas-sort-popover button {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: var(--teacher-option-radius);
  font-size: var(--teacher-control-font-size);
  line-height: 20px;
}
body.ui-teacher .canvas-sort-popover button::before {
  order: 1;
  margin-left: auto;
  text-align: center;
}
body.ui-teacher .canvas-sort-section { padding: 4px 12px; }
