/* My schedule: the week's classes Admin Sales publishes, as a school timetable.
   Teacher colours are Admin Sales' eight categorical chart colours, in the same
   slots, so a teacher has the same colour in both apps. */
.my-schedule-page {
  --schedule-1: #2a78d6;
  --schedule-2: #eb6834;
  --schedule-3: #1baf7a;
  --schedule-4: #eda100;
  --schedule-5: #e87ba4;
  --schedule-6: #008300;
  --schedule-7: #4a3aa7;
  --schedule-8: #e34948;
  display: grid;
  gap: 16px;
}

.schedule-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.schedule-week { min-width: 150px; text-align: center; color: var(--brand-navy); }
.schedule-button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 800; text-decoration: none; }
.schedule-button:hover, .schedule-button:focus-visible { border-color: var(--brand-navy); }

.schedule-teachers { display: flex; flex-wrap: wrap; gap: 6px; }
.schedule-teacher { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 0.85rem; font-weight: 800; text-decoration: none; }
.schedule-teacher.is-active { border-color: var(--teacher, var(--brand-navy)); background: color-mix(in srgb, var(--teacher, var(--brand-navy)) 14%, var(--surface)); }
.schedule-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--teacher, var(--muted)); }

.schedule-summary, .schedule-empty { margin: 0; color: var(--muted); font-weight: 700; }

.schedule-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card); }
.schedule-grid { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(140px, 1fr)); min-width: calc(56px + var(--cols) * 140px); }
.schedule-corner, .schedule-day-head { position: sticky; top: 0; z-index: 2; padding: 10px 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
.schedule-corner { left: 0; z-index: 3; }
.schedule-day-head { display: grid; gap: 2px; border-left: 1px solid var(--line); border-top: 4px solid transparent; }
.schedule-day-head strong { font-size: 0.9rem; }
.schedule-day-head small { color: var(--muted); font-size: 0.75rem; }
.schedule-day-head.is-today { border-top-color: var(--brand-navy); }
.schedule-day-head.is-today strong { color: var(--brand-navy); }

.schedule-hours { position: sticky; left: 0; z-index: 1; height: calc(var(--rows) * var(--row)); background: var(--surface); }
.schedule-hours span { position: absolute; right: 8px; transform: translateY(-50%); color: var(--muted); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.schedule-hours span:first-child { transform: none; }
.schedule-hours span:last-child { transform: translateY(-100%); }

.schedule-day { position: relative; height: calc(var(--rows) * var(--row)); border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px calc(var(--row) * 2)); }
.schedule-day.is-today { background-color: var(--brand-cyan-soft); }

.schedule-block { position: absolute; box-sizing: border-box; display: flex; align-items: center; padding: 0 6px; overflow: hidden; border-left: 4px solid var(--teacher); border-radius: 0 8px 8px 0; background: color-mix(in srgb, var(--teacher) 14%, var(--surface)); color: var(--text); font-size: 0.72rem; font-weight: 800; line-height: 1.2; }
.schedule-block span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.schedule-block.is-held { background: color-mix(in srgb, var(--teacher) 32%, var(--surface)); }
.schedule-block.is-cancelled { background: var(--surface-soft); color: var(--muted); text-decoration: line-through; }
.schedule-block.is-cancelled-advance, .schedule-block.is-moved-away { border: 1px dashed var(--muted); border-left: 4px dashed var(--teacher); background: transparent; color: var(--muted); font-weight: 700; }
.schedule-block.is-changed { box-shadow: inset 0 0 0 2px var(--accent-orange); }
.schedule-block.is-trial span { font-style: italic; }
.schedule-block:focus-visible { z-index: 1; outline: 2px solid var(--brand-navy); outline-offset: 1px; }
.schedule-more { position: absolute; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: var(--text); font-size: 0.72rem; font-weight: 900; cursor: help; }
.schedule-now { position: absolute; left: 0; right: 0; z-index: 1; height: 0; border-top: 2px solid var(--accent-coral); pointer-events: none; }

.schedule-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; color: var(--muted); font-size: 0.85rem; }

.schedule-changes { display: grid; gap: 10px; padding: clamp(16px, 3vw, 24px); border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
.schedule-changes h2 { margin: 0; font-size: 1.1rem; }
.schedule-changes ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.schedule-changes li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.schedule-changes em { color: var(--muted); font-style: normal; font-weight: 700; }
