/* staff: help queue, course FAQ, class pulse and check-ins (app/routes/staff.py). Uses the tokens in app.css. */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
.tablewrap { overflow-x: auto; }

/* ---------------------------------------------------------------- tutor drawer: "Ask a person" */
.td-foot { display: flex; align-items: center; gap: .5rem; padding: .45rem .9rem calc(.55rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface-2); }
.td-askbtn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .3rem .75rem;
  font: 650 .82rem var(--font); cursor: pointer;
}
.td-askbtn:hover, .td-askbtn[aria-expanded="true"] { border-color: var(--maroon); color: var(--maroon-ink); }
.td-ask { flex: 1; overflow-y: auto; padding: .9rem; }
.td-ask[hidden] { display: none; }
.td-ask-form { display: flex; flex-direction: column; gap: .45rem; }
.td-ask-form p { margin: 0; }
.td-ask-share { display: flex; gap: .4rem; align-items: center; }
.td-ask-share input { width: auto; }
.td-ask-done p { margin: 0 0 .5rem; }
.td-ask button:focus-visible, .td-askbtn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------------------------------------------------------------- student: my questions */
.helpitem { padding: .75rem 0; border-top: 1px solid var(--line); }
.helpitem:first-of-type { border-top: 0; padding-top: 0; }
.helpq { margin: .35rem 0; white-space: pre-wrap; }
.helpq.big { font-size: 1.02rem; }
.helpanswer { border-left: 3px solid var(--maroon); background: var(--surface-2); border-radius: 0 8px 8px 0; padding: .55rem .8rem; }
.helpanswer.new { border-left-color: var(--orange); }
.helpanswer > div[data-md] > :first-child { margin-top: .2rem; }
.helpanswer > div[data-md] > :last-child { margin-bottom: 0; }
.newtag { color: var(--orange-ink); }
.pill.hstatus.open { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pill.hstatus.answered { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill.hstatus.closed { color: var(--muted); }

/* ---------------------------------------------------------------- dashboard inbox */
.inbox-card { margin: 1rem 0; border-left: 4px solid var(--orange); }
.inbox-card[hidden] { display: none; }
.inbox-item { padding: .7rem 0 .2rem; border-top: 1px solid var(--line); margin-top: .6rem; }
.inbox-answer > :first-child { margin-top: .3rem; }
.inbox-answer > :last-child { margin-bottom: .4rem; }

/* ---------------------------------------------------------------- FAQ */
.faq-layout { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.faq-layout > .empty { grid-column: 1 / -1; }
.faq-toc { position: sticky; top: 5rem; font-size: .88rem; }
.faq-toc ol { margin: 0; padding-left: 1.2rem; }
.faq-toc li + li { margin-top: .35rem; }
.faqitem { scroll-margin-top: 5.5rem; }
.faqitem h2 { margin: 0 0 .25rem; font-size: 1.12rem; }
.faq-answer { margin-top: .6rem; }
.faq-answer > :last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- staff: help queue */
.helptable tr.is-open td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
.help-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.help-transcript { max-height: 70vh; overflow-y: auto; padding: .2rem 0; }
.draft-check { margin-bottom: .6rem; }
.draft-check[hidden] { display: none; }
.staff-summary { margin: .6rem 0 0; }
.staff-summary[hidden] { display: none; }

/* ---------------------------------------------------------------- class pulse */
.pulse-gen { display: flex; flex-direction: column; gap: .5rem; min-width: 15rem; padding: .8rem 1rem; }
.pulse-days { cursor: pointer; display: inline-flex; align-items: center; position: relative; }
.pulse-days input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }   /* still focusable */
.pulse-days:has(input:checked) { background: var(--brand-fill); color: #fff; border-color: var(--brand-fill); }
.pulse-days:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.pulse-status:empty { display: none; }
.pulse-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: 1rem; align-items: start; }
.pulse-head { border-left: 4px solid var(--maroon); }
.pulse-headline { font-size: 1.08rem; font-weight: 600; margin: .3rem 0 .4rem; }
.pulse-theme h2 { margin: 0; font-size: 1.1rem; }
.pulse-summary { margin: .5rem 0; }
.pulse-summary > :last-child { margin-bottom: 0; }
.pulse-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: .7rem 0 .5rem; }
.pulse-act { background: var(--surface-2); border-radius: 10px; padding: .6rem .75rem; font-size: .92rem; }
.pulse-act .eyebrow { color: var(--maroon-ink); margin-bottom: .2rem; }
.pulse-act > div[data-md] > :first-child { margin-top: 0; }
.pulse-act > div[data-md] > :last-child { margin-bottom: 0; }
.list li.on a { font-weight: 700; }

/* ---------------------------------------------------------------- check-ins */
.checkins { position: sticky; top: 5rem; }
.checkin { padding: .7rem 0; border-top: 1px solid var(--line); }
.checkin ul { margin: .35rem 0 0; padding-left: 1.1rem; color: var(--ink-2); }
.checkin li + li { margin-top: .2rem; }

@media (max-width: 1000px) {
  .pulse-layout, .help-detail { grid-template-columns: 1fr; }
  .checkins { position: static; }
}
@media (max-width: 760px) {
  .faq-layout { grid-template-columns: 1fr; }
  .faq-toc { position: static; }
  .pulse-actions { grid-template-columns: 1fr; }
  .pulse-gen { min-width: 0; width: 100%; }
}
