/* Academics and scheduling: timetable editing, issue lists, the load matrix, availability */

.tt-editable .tt-block[draggable="true"] { cursor: grab; }
.tt-editable .tt-block.is-dragging { opacity: .45; }
.tt-editable .tt-cell.is-drop { background: rgba(var(--accent-rgb), .12); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .45); }
.tt-block .tt-sub { display: block; font-size: .7rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-block .tt-teacher { display: block; font-size: .7rem; font-style: italic; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-block a { text-decoration: none; display: block; }
.tt-block a:hover strong { text-decoration: underline; }
.tt-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .78rem; color: var(--muted); margin: .5rem 0 0; }
.tt-legend span::before { content: ""; display: inline-block; width: .85rem; height: .65rem; margin-right: .35rem; vertical-align: -.05em; border-radius: 2px; border: 1px solid #bfd0e8; border-left: 3px solid var(--accent); background: var(--accent-tint); }
.tt-legend .lg-lab::before { background: #eaf4ee; border-color: #bcdcc8; border-left-color: var(--green); }
.tt-legend .lg-draft::before { border-style: dashed; }
.tt-legend .lg-conflict::before { background: #fbeceb; border-color: #efc3bf; border-left-color: var(--redpen); }

/* issues from the conflict checker */
.issue-list { list-style: none; margin: 0; padding: 0; font-size: .86rem; }
.issue-list li { display: flex; gap: .5rem; align-items: flex-start; padding: .35rem 0; border-top: 1px solid var(--line-soft); }
.issue-list li:first-child { border-top: 0; }
.issue-list .bi { flex: 0 0 auto; margin-top: .12rem; }
.issue-list .is-hard .bi { color: var(--redpen); }
.issue-list .is-soft .bi { color: var(--amber); }
.issue-list .is-ok .bi { color: var(--green); }
.issue-list .is-excepted { color: var(--muted); }
.issue-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .45rem .75rem; background: var(--surface-2); min-height: 2.2rem; }
.issue-box:empty { display: none; }

/* the faculty load matrix */
.load-cell { min-width: 150px; }
.load-cell .meter { margin-top: .2rem; }
.load-figures { font-variant-numeric: tabular-nums; white-space: nowrap; }
.load-under { color: var(--amber); }
.load-over { color: var(--redpen); font-weight: 650; }

/* the availability editor of a faculty profile */
.avail-grid { display: grid; grid-template-columns: 64px repeat(7, minmax(52px, 1fr)); gap: 2px; font-size: .72rem; min-width: 520px; }
.avail-grid .ag-head { text-align: center; font-weight: 650; color: var(--ink-soft); padding: .2rem 0; }
.avail-grid .ag-time { text-align: right; color: var(--muted); padding-right: .35rem; }
.avail-grid .ag-cell { height: 16px; border-radius: 2px; background: #eef1f0; }
.avail-grid .ag-cell.k-available { background: #cfe5d8; }
.avail-grid .ag-cell.k-preferred { background: var(--green); }
.avail-grid .ag-cell.k-unavailable { background: #efc3bf; }
.avail-key { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .76rem; color: var(--muted); margin-top: .4rem; }
.avail-key span::before { content: ""; display: inline-block; width: .8rem; height: .6rem; margin-right: .3rem; border-radius: 2px; vertical-align: -.03em; background: #eef1f0; }
.avail-key .k-available::before { background: #cfe5d8; }
.avail-key .k-preferred::before { background: var(--green); }
.avail-key .k-unavailable::before { background: #efc3bf; }

/* curriculum plan */
.plan-term { margin-bottom: 1rem; }
.plan-term > .card-header { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.plan-term .units { color: var(--muted); font-weight: 500; font-size: .82rem; }
.prereq-list { font-size: .78rem; color: var(--muted); }

/* generator results */
.gen-reasons { margin: .25rem 0 .2rem 1rem; padding: 0; font-size: .84rem; }
.gen-suggest { margin: .2rem 0 0 1rem; padding: 0; font-size: .84rem; color: var(--accent-deep); }

@media (max-width: 575.98px) {
  .load-cell { min-width: 120px; }
}
@media print {
  .tt-wrap { box-shadow: none; border-color: #999; }
  .tt { min-width: 0; }
  .tt-block { box-shadow: none; }
}
.tt-legend em { font-style: normal; }
