/* UI patch for the r9 LessonsView only. Shared attendance/theme CSS is intact. */
.lesson-week-tabs, .lesson-week-mobile-caption { display: none; }
.lesson-week-scroll { width: 100%; background: var(--surface); }
.lesson-week-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.lesson-week-table {
  width: 100%; min-width: calc(60px + var(--lesson-day-count, 5) * 176px);
  table-layout: fixed; border-collapse: separate; border-spacing: 0;
  color: var(--ink); font-size: 13px;
}
.lesson-week-table .lesson-week-hour-column { width: 60px; }
.lesson-week-table th, .lesson-week-table td {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  vertical-align: top; text-align: left;
}
.lesson-week-table tr > :last-child { border-right: 0; }
.lesson-week-table tbody tr:last-child > * { border-bottom: 0; }
.lesson-week-table thead th { background: var(--paper); padding: 13px 10px; }
.lesson-week-day > strong { display: block; font-size: 13px; font-weight: 600; }
.lesson-week-date { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.lesson-week-day > small { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.lesson-week-table .lesson-week-hour-heading,
.lesson-week-table .lesson-week-hour {
  position: sticky; left: 0; z-index: 1; background: var(--paper);
  padding: 14px 8px; text-align: center; color: var(--muted); font-size: 12px;
}
.lesson-week-cell { padding: 0; background: var(--surface); overflow-wrap: anywhere; }
.lesson-week-table tbody tr:nth-child(even) .lesson-week-cell { background: var(--stripe); }
.lesson-week-table .lesson-week-cell.is-free { background: var(--paper); }
.lesson-week-entry { padding: 10px; min-width: 0; }
.lesson-week-entry + .lesson-week-entry { border-top: 1px dashed var(--line); }
.lesson-week-field {
  display: inline-block; padding: 3px 6px; border-radius: 4px;
  background: var(--teal-pale); color: var(--teal); font-size: 11px;
  font-weight: 600; line-height: 1.4; max-width: 100%; overflow-wrap: anywhere;
}
.lesson-week-content { margin: 8px 0 6px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.lesson-week-teacher, .lesson-week-owner { display: block; font-size: 11px; color: var(--muted); }
.lesson-week-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.lesson-week-actions { display: flex; flex-wrap: wrap; gap: 3px; }
.lesson-week-actions .icon-button { width: 30px; height: 30px; min-height: 30px; padding: 5px; border: 1px solid var(--line); border-radius: 5px; }
.lesson-week-note { margin: 7px 0; font-size: 12px; }
.lesson-week-note summary { cursor: pointer; color: var(--teal); line-height: 1.5; }
.lesson-week-note p { margin: 6px 0; white-space: pre-wrap; color: var(--muted); line-height: 1.45; }
.lesson-week-add {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  width: 100%; min-height: 56px; padding: 12px 8px; font-size: 12px;
  color: var(--muted); background: transparent; border: 0; cursor: pointer;
}
.lesson-week-add:hover:not(:disabled) { color: var(--teal); background: var(--teal-pale); }
.lesson-week-add:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
.lesson-week-add:disabled { cursor: default; opacity: .5; }
.lesson-week-unavailable { display: block; min-height: 56px; padding: 18px 8px; text-align: center; color: var(--muted); }
/* Use exactly the same breakpoint and day-tabs styles as AttendanceView. */
@media (max-width: 1050px) {
  .workspace-section:has(> .lesson-week-view) > .section-heading { flex-wrap: wrap; }
  .lesson-week-tabs { display: flex; }
  .lesson-week-tabs > button { min-width: 0; }
  .lesson-week-desktop-caption { display: none; }
  .lesson-week-mobile-caption { display: inline; }
  .lesson-week-table { min-width: 0; }
  .lesson-week-table colgroup { display: none; }
  .lesson-week-day:not(.is-selected), .lesson-week-cell:not(.is-selected) { display: none; }
  .lesson-week-day.is-selected, .lesson-week-cell.is-selected { border-right: 0; }
  .lesson-week-table .lesson-week-hour-heading, .lesson-week-table .lesson-week-hour {
    position: static; width: 48px; padding-inline: 4px;
  }
  .lesson-week-actions .icon-button { width: 36px; height: 36px; min-height: 36px; }
}
@media (forced-colors: active) {
  .lesson-week-field, .lesson-week-actions .icon-button { border: 1px solid CanvasText; }
}
