/* vle-quiz-attendance — QuizVerse's engagement attendance in the app (29 Oct 2026): the student's weekly figure on the
   Attendance page, the staff "Quiz engagement" tab, and its sheets (a record, a quiz's register, the credit bands).
   Every class starts qatt-; the sheets live in #modal-root, so nothing here depends on the page around it. */

.qatt-loading { padding: 20px 0; }
.qatt .qatt-c-ok   { color: var(--success); }
.qatt .qatt-c-warn { color: var(--warning); }
.qatt .qatt-c-low  { color: var(--danger); }
.qatt .qatt-c-none { color: var(--text-3); }
.qatt .qatt-chip { cursor: default; font-weight: 600; }
.qatt .qatt-chip:hover { background: var(--card); color: var(--text-2); }
.qatt .qatt-sub {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin: 14px 0 8px;
}
.qatt .qatt-grow { flex: 1 1 200px; min-width: 0; }
.qatt-tag {
  display: inline-flex; padding: 2px 7px; border-radius: var(--r-xs); font-size: 10.5px; font-weight: 700;
  color: var(--info); background: var(--info-tint);
}

/* ============ the student: weekly attendance ============ */
.qatt-stu { margin: 4px 0 18px; }
.qatt-stu .qatt-head { margin-bottom: 12px; }
.qatt-stu .qatt-head h3 { margin: 0 0 2px; font-size: 16px; }
.qatt-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.qatt-tiles .stat { min-width: 0; }

.qatt-rule { padding: 0; margin-bottom: 12px; }
.qatt-rule summary {
  display: flex; align-items: center; gap: 9px; padding: 13px 18px; cursor: pointer; list-style: none;
  font-size: 13px; font-weight: 700;
}
.qatt-rule summary::-webkit-details-marker { display: none; }
.qatt-rule summary svg { width: 18px; height: 18px; color: var(--gold-dark); flex: none; }
.qatt-rule-body { padding: 0 18px 16px; }
.qatt-rule-body p { margin: 0 0 10px; }
.qatt-rule-body .chip-row { margin-bottom: 10px; }

.qatt-weeks { display: flex; flex-direction: column; gap: 10px; }
.qatt-weeks .card + .card { margin-top: 0; }
.qatt-week { padding: 0; }
.qatt-week > summary {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.qatt-week > summary::-webkit-details-marker { display: none; }
.qatt-week-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qatt-week-t b { font-size: 14px; }
.qatt-week-t span { font-size: 12px; color: var(--text-2); }
.qatt-pill {
  flex: none; padding: 4px 11px; border-radius: var(--r-pill); font-size: 13px; font-weight: 780;
  font-variant-numeric: tabular-nums; background: var(--fill-2); color: var(--text-2);
}
.qatt-pill-ok   { background: var(--success-tint); color: var(--success); }
.qatt-pill-warn { background: var(--warning-tint); color: var(--gold-700); }
.qatt-pill-low  { background: var(--danger-tint); color: var(--danger); }
.qatt-pill-none { font-weight: 650; font-size: 12px; }
.qatt-chev { flex: none; display: inline-flex; color: var(--text-3); transition: transform .2s var(--ease-out); }
.qatt-week[open] .qatt-chev { transform: rotate(90deg); }
.qatt-week-body { padding: 0 18px 16px; border-top: 1px solid var(--line); }
.qatt-week-body > .qatt-sub:first-child { margin-top: 12px; }

.qatt-days { display: flex; flex-wrap: wrap; gap: 6px; }
.qatt-day {
  display: inline-flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--card); font-size: 11.5px; line-height: 1.25; min-width: 74px;
}
.qatt-day b { font-size: 12px; }
.qatt-day span { color: var(--text-2); font-weight: 650; }
.qatt-day.is-present { border-color: color-mix(in srgb, var(--success) 35%, var(--line)); }
.qatt-day.is-present span { color: var(--success); }
.qatt-day.is-late { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.qatt-day.is-late span { color: var(--gold-700); }
.qatt-day.is-absent { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.qatt-day.is-absent span { color: var(--danger); }
.qatt-day.is-excused span { color: var(--text-3); }
.qatt-day.is-mixed span { color: var(--warning); }

.qatt-qlist { display: flex; flex-direction: column; }
.qatt-q { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line); }
.qatt-q:last-child { border-bottom: 0; }
.qatt-q-main { flex: 1; min-width: 0; }
.qatt-q-title { font-weight: 700; font-size: 13.5px; line-height: 1.3; }
.qatt-q-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; overflow-wrap: anywhere; }
.qatt-q-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 46%; text-align: right; }
.qatt-q-end b { font-size: 16px; font-variant-numeric: tabular-nums; }
.qatt-q-end .badge { white-space: normal; text-align: right; }
.qatt-none { margin-top: 10px; }
.qatt-foot { margin-top: 10px; }

/* ============ staff: the list ============ */
.qatt-staff .qatt-bar { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.qatt-staff .qatt-bar > .small { flex: 1 1 320px; max-width: 640px; }
.qatt-staff .qatt-actions { gap: 8px; }
.qatt-staff .qatt-stats { margin-bottom: 14px; }
.qatt-filters { padding: 16px 18px 14px; margin-bottom: 12px; }
.qatt-frow { display: flex; flex-wrap: wrap; gap: 0 12px; }
.qatt-frow .form-field { flex: 1 1 170px; min-width: 0; margin-bottom: 12px; }
.qatt-bandline { margin-bottom: 12px; }
.qatt-bandline .chip { padding: 5px 11px; font-size: 11.5px; }

.qatt-list { padding: 6px 0; }
.qatt-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 18px 10px; flex-wrap: wrap; }
.qatt-list .empty { padding: 36px 20px; }
.qatt-row {
  display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px 18px; border: 0; border-top: 1px solid var(--line);
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background var(--t);
}
div.qatt-row { cursor: default; }
button.qatt-row:hover { background: var(--fill); }
button.qatt-row:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: -2px; }
.qatt-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.qatt-row-main b { font-size: 13.5px; }
.qatt-row-where { overflow-wrap: anywhere; }
.qatt-row-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 45%; text-align: right; }
.qatt-row-end b { font-size: 15px; font-variant-numeric: tabular-nums; }
.qatt-row-end .badge { white-space: normal; text-align: right; }
.qatt-pager { justify-content: center; margin-top: 12px; }

/* ============ the sheets ============ */
.qatt-sheet .qatt-rec-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.qatt-rec-name { font-weight: 750; font-size: 15px; line-height: 1.3; }
.qatt-big { font-size: 24px !important; }
.qatt-dl { margin: 6px 0 4px; display: grid; gap: 0; }
.qatt-dl > div { display: grid; grid-template-columns: 132px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.qatt-dl dt { color: var(--text-3); font-weight: 650; font-size: 12px; }
.qatt-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.qatt-ov { margin-top: 6px; }
.qatt-ov .qatt-picks { margin-bottom: 12px; }
.qatt-ov .qatt-picks .chip { padding: 6px 11px; font-size: 12px; }
.qatt-ov-row { display: flex; gap: 12px; flex-wrap: wrap; }
.qatt-ov-row > .form-field:first-child { flex: 0 1 120px; }
.qatt-ov-btns { justify-content: flex-end; margin-top: 4px; }
.qatt-ov .form-error { margin-bottom: 10px; }
.qatt-log { list-style: none; margin: 0; padding: 0; }
.qatt-log li { padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }

.qatt-reg-head { margin-bottom: 10px; }
.qatt-reg-sum { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 10px; font-size: 12.5px; color: var(--text-2); }
.qatt-reg-sum b { color: var(--text); font-variant-numeric: tabular-nums; }
.qatt-reg-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.qatt-reg-tools input[type=search] { flex: 1 1 180px; min-width: 0; }
.qatt-reg-tools select { width: auto; flex: 0 1 auto; }
.qatt-reg-list .qatt-row { padding-left: 0; padding-right: 0; }
.qatt-reg-list .qatt-row:first-child { border-top: 0; }

.qatt-bands { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.qatt-band {
  position: relative; display: grid; grid-template-columns: 92px 92px 1fr 120px; gap: 0 10px; align-items: end;
  padding: 12px 40px 0 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2, var(--card));
}
.qatt-band .form-field { margin-bottom: 12px; min-width: 0; }
.qatt-band-x {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: var(--r-xs);
  background: none; color: var(--text-3); cursor: pointer; display: grid; place-items: center;
}
.qatt-band-x:hover { background: var(--fill); color: var(--danger); }
.qatt-set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-top: 14px; }
.qatt-set-grid .form-field .small { display: block; margin-top: 4px; }
.qatt-check { display: flex; gap: 9px; align-items: center; font-size: 13px; font-weight: 600; margin: 2px 0 14px; cursor: pointer; }
.qatt-check input { width: 17px; height: 17px; accent-color: var(--accent); }

/* ============ phones ============ */
@media (max-width: 640px) {
  .qatt-tiles { gap: 8px; }
  .qatt-tiles .stat { padding: 12px 12px; }
  .qatt-tiles .stat .stat-value { font-size: 22px; }
  .qatt-tiles .stat .stat-label { font-size: 10px; letter-spacing: .05em; }
  .qatt-week > summary, .qatt-rule summary { padding: 13px 14px; }
  .qatt-week-body, .qatt-rule-body { padding-left: 14px; padding-right: 14px; }
  .qatt-row { padding: 12px 14px; }
  .qatt-list-head { padding: 8px 14px 10px; }
  .qatt-staff .qatt-actions { width: 100%; }
  .qatt-staff .qatt-actions .btn { flex: 1 1 auto; }
  .qatt-filters { padding: 14px 14px 12px; }
  .qatt-frow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; }
  .qatt-frow .qatt-grow { grid-column: 1 / -1; }
  .qatt-frow .form-field { margin-bottom: 10px; }
  .qatt-bandline { display: none; }   /* the Credit bands button shows them on a phone */
  .qatt-band { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 0 8px; padding-right: 40px; }
  .qatt-band-label { grid-column: 1 / -1; }
  .qatt-set-grid { grid-template-columns: 1fr; }
  .qatt-dl > div { grid-template-columns: 1fr; gap: 2px; }
}
