/* Settings → Canvas, Workday timetable and Syllabi: the Sync Canvas steps and bookmark, hidden
   Canvas spaces, the timetable import preview, and one row per course for syllabi.
   Room tokens only. */

/* ---- Numbered steps (Canvas, Workday help) -------------------------------------------------- */

.sync-steps { display: flex; flex-direction: column; gap: 10px; max-width: 68ch; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.sync-steps li { position: relative; padding-left: 36px; counter-increment: step; }
.sync-steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
}
.sync-steps b { font-weight: 600; }
.sync-steps span { color: var(--muted); }
.sync-steps a { color: var(--accent); font-weight: 600; }

/* ---- Canvas ----------------------------------------------------------------------------- */

.sync-tools { margin-top: 16px; }
.sync-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; }
.sync-drag { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 22px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-item); text-align: center; }
.bookmark { gap: 8px; cursor: grab; }
.bookmark:active { cursor: grabbing; }
.bookmark svg { width: 18px; height: 18px; }
.sync-drag .hint { max-width: 22ch; }
.sync-phone { display: none; }

.hidden-list { display: flex; flex-direction: column; margin: 8px 0 0; padding: 0; list-style: none; }
.hidden-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.hidden-list li > div { min-width: 0; }
.hidden-name { display: block; overflow: hidden; color: var(--ink-2); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.hidden-list small { display: block; color: var(--muted); font-size: 12.5px; }
#hidden-msg:empty { display: none; }
#hidden-msg { margin-top: 6px; }

#canvas-ai .switch { font-weight: 600; }
.news-ai-hint { max-width: 68ch; margin-top: 8px; }

/* ---- Workday timetable ------------------------------------------------------------------ */

#tt-terms-list + .tt-actions { margin-top: 10px; }
.tt-actions { margin-top: 16px; }
.tt-msg { min-height: 1.45em; margin-top: 8px; }
.tt-msg:empty { min-height: 0; margin-top: 0; }

.tt-preview { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgb(255 255 255 / 40%); }
.tt-preview h3 { font-size: 15.5px; font-weight: 650; }
.tt-preview > .hint { margin: 4px 0 12px; }
.tt-preview .form-actions { margin-top: 14px; }

.tt-table-wrap { overflow-x: auto; }
.tt-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tt-table th { padding: 0 10px 8px 0; color: var(--label); font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.tt-table td { padding: 8px 10px 8px 0; border-top: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.tt-table td b { font-weight: 650; }
.tt-table td small { display: block; color: var(--muted); font-size: 12.5px; }

.tt-help { margin-top: 14px; }
.tt-help summary { width: fit-content; color: var(--ink-2); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.tt-help summary:hover { color: var(--accent); }
.tt-help summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.tt-help .sync-steps { margin-top: 12px; }

/* ---- Transcript and target --------------------------------------------------------------- */

#tr-saved + .tt-preview, #tr-saved + .tt-actions { margin-top: 10px; }
.tr-table th.n, .tr-table td.n { text-align: right; }
.tr-table td.muted { color: var(--muted); }
.tr-table td:nth-child(2), .tr-table td:last-child { white-space: normal; }
.tr-table td:first-child { white-space: normal; min-width: 7ch; }
.tr-paste { max-width: 560px; margin-top: 12px; }
.tr-paste textarea { width: 100%; min-height: 120px; resize: vertical; font: inherit; font-size: 13.5px; line-height: 1.45; }
.tr-paste .form-actions { margin-top: 8px; }
.tr-goal { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.goal-input { display: flex; align-items: center; gap: 8px; max-width: 160px; color: var(--ink-2); font-weight: 600; }
.goal-input .input { width: 100%; }

/* ---- Syllabi ------------------------------------------------------------------------------ */

.set-rows.syllabi { margin-top: 14px; }
/* Course on the left; its standing on the right with the small actions underneath it. */
.syllabus-row { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; }
.syllabus-row > .set-row-text { grid-row: 1 / 3; }
.syllabus-row > .syl-state { grid-column: 2; grid-row: 1; }
.syllabus-row > .syl-actions { grid-column: 2; grid-row: 2; justify-content: flex-start; }
.syllabus-row .set-row-text small { white-space: normal; }
.syl-state { display: flex; flex-direction: column; min-width: 0; }
.syl-word { color: var(--ink-2); font-size: 13.5px; font-weight: 650; }
.syl-word.ok { color: var(--gain); }
.syl-word.ok::before { content: ""; display: inline-block; width: 9px; height: 5px; margin: 0 7px 3px 1px; border-bottom: 2px solid currentColor; border-left: 2px solid currentColor; transform: rotate(-45deg); }
.syl-word.look { color: var(--amber); }
.syl-state small { color: var(--muted); font-size: 12.5px; }
.syl-actions { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 4px 14px; }
.link-btn.accent { color: var(--accent); text-decoration-color: rgb(var(--accent-rgb) / 35%); }
.syl-actions .to-settings { font-size: 13px; }
.syllabus-row > .syl-note, .syllabus-row > .weights-editor { grid-column: 1 / -1; }
.syl-note .to-settings { font-size: 13px; }
.syllabus-row > .weights-editor { margin-top: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgb(255 255 255 / 40%); }

@media (max-width: 899px) {
  .sync-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 640px) {
  .syllabus-row { grid-template-columns: minmax(0, 1fr); }
  .syllabus-row > .set-row-text, .syllabus-row > .syl-state, .syllabus-row > .syl-actions { grid-column: 1; grid-row: auto; }
}
/* Phones and tablets have no bookmarks bar to drag to. */
@media (hover: none) and (pointer: coarse) {
  .sync-drag { display: none; }
  .sync-phone { display: block; }
}
