/* staff-panel.css: the staff panel (app/static/portal/staff-panel.js; PS-10), drawn to the accepted
   look-accepted/day-7-staff.html. It starts from PL-08's cut-down copy (foundation/PL-08/redrawn/css/staff-panel.css),
   with the preview's .adm-* names changed to .sp-*, because admin.css (PS-04) already has an .adm-form of another
   shape and both stylesheets load on every page. The house's parts come from house.css: the staff's states
   (.house-state), the labelled rows in their compact form (.house-labelled.is-compact), a row's small controls
   (.house-controls), the quiet action (.link-btn.house-quiet). Every colour, type family, radius and shadow is a
   custom property of ../styles.css or house.css. Parts that house.css lacks, for PL-07: the fold of a row that does
   not apply yet (.sp-fold), the code in full screen (.sp-full), the inline mark form (.sp-mark-form). */

/* ---- The staff panel ------------------------------------------------------------------------------------------ */
.staff-panel { margin: 22px 0 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); }
.house-main > [data-slot="staff-panel"]:first-child > .staff-panel { margin-top: 0; }
.staff-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px;
  padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.staff-panel-head h2 { margin: 0; font-size: 12px; font-weight: 750; letter-spacing: .15em; line-height: 1.68;
  text-transform: uppercase; color: var(--ink-2); }
.staff-panel > .house-labelled.is-compact { margin: 0; padding: 4px 24px 10px; }
.staff-panel > .house-labelled.is-compact > div { padding: 16px 0; }
.staff-panel > .house-labelled.is-compact > div:first-child { border-top: 0; }
.staff-panel > .sp-wait { margin: 0; padding: 16px 24px 18px; }
.staff-panel > .sp-wait[hidden] { display: none; }
/* Inside the home page's Today, the panel is a part of the card it stands in: no frame of its own. */
.staff-panel.is-inset { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none;
  background: transparent; }
.staff-panel.is-inset > .staff-panel-head { padding: 14px 0 6px; border-bottom: 0; background: transparent; }
.staff-panel.is-inset > .house-labelled.is-compact { padding: 0 0 4px; }
.staff-panel.is-inset > .sp-wait { padding: 8px 0; }
@media (max-width: 640px) {
  .staff-panel-head { padding: 12px 16px; }
  .staff-panel > .house-labelled.is-compact { padding: 2px 16px 8px; }
  .staff-panel > .sp-wait { padding: 12px 16px 14px; }
}

/* ---- Items with a state and small controls (a timed item, a register's row, a learner's afternoon) ----------- */
.sp-items { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); }
.sp-items > li { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) auto; gap: 6px 16px;
  align-items: center; margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14.5px;
  line-height: 1.45; color: var(--ink-2); }
.sp-items > li:first-child { border-top: 0; }
.sp-items .house-controls:empty { display: none; }
.sp-item-name { font-weight: 650; color: var(--ink); }
.sp-item-name a { color: var(--ink); text-decoration: none; }
.sp-item-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sp-item-extra { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.sp-items > li > .sp-mark-form { grid-column: 1 / -1; }
/* The list follows the width of the row it stands in, not the window's: beside a rail, a row is narrow on a wide screen. */
.staff-panel .house-labelled.is-compact dd { container-type: inline-size; }
@container (max-width: 639px) {
  .sp-items > li { grid-template-columns: minmax(0, 1fr) auto; }
  .sp-items > li > :nth-child(1) { grid-area: 1 / 1; }
  .sp-items > li > :nth-child(2) { grid-area: 2 / 1; }
  .sp-items > li > .house-controls { grid-area: 1 / 2 / span 2; }
  .sp-items > li > .sp-mark-form { grid-area: 3 / 1 / auto / -1; }
}
@container (max-width: 439px) {
  .sp-items > li { grid-template-columns: minmax(0, 1fr); }
  .sp-items > li > .house-controls { grid-area: auto; justify-content: flex-start; }
  .sp-items > li > .sp-mark-form { grid-area: auto; }
}

/* ---- Teaching materials ------------------------------------------------------------------------------------- */
.sp-materials { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sp-materials > li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 2px 16px; align-items: baseline;
  font-size: 14.5px; line-height: 1.5; }
@container (max-width: 520px) {
  .sp-materials > li { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Forms: the session's note, the check-in's minutes, a mark's note ----------------------------------------- */
.sp-form { display: grid; gap: 10px; max-width: 40rem; }
.sp-form label, .sp-mark-form label, .sp-open-form label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.sp-form label { margin-bottom: -6px; }
.sp-form textarea.input { min-height: 64px; }
.sp-form .btn { justify-self: start; }
.sp-open-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sp-open-form .sp-minutes { width: 5.5rem; min-height: 30px; padding: 4px 10px; font-size: 14px; }
.sp-mark-form { display: grid; gap: 8px; margin: 4px 0 2px; padding: 12px 0 2px; border-top: 1px dashed var(--line); }
.sp-mark-form .input { max-width: 32rem; }
.sp-mark-form .house-controls { margin: 0; }

/* ---- The check-in's code, large, while the check-in is open ----------------------------------------------------- */
.sp-code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.sp-code { display: grid; gap: 4px; margin: 0; padding: 10px 18px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--surface-2); }
.sp-code-value { font: 650 28px/1.1 var(--mono); letter-spacing: .32em; color: var(--ink); }
.sp-code-row .house-controls { margin: 0; }
/* The code in full screen, for the room to read. */
.sp-full { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 18px; padding: 24px; background: var(--bg); color: var(--ink); text-align: center; }
.sp-full .house-label { font-size: 15px; }
.sp-full-code { margin: 0; font: 700 clamp(64px, 18vw, 220px)/1 var(--mono); letter-spacing: .18em; }
.sp-full-help { margin: 0; max-width: 32rem; font-size: 18px; color: var(--ink-2); }

/* ---- A row that does not apply yet, folded to one line (the look verdict's ruling 10) --------------------------- */
.sp-folded { color: var(--ink-3); }
.sp-fold > summary { display: list-item; cursor: pointer; color: var(--ink-2); }
.sp-fold > summary::marker { color: var(--ink-3); }
.sp-fold > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sp-fold-body { margin-top: 10px; }
.sp-fold-body > * + * { margin-top: 10px; }
.sp-fold-body > p { margin-bottom: 0; }

/* ---- The questions missed most, the topics to go over, the guide -------------------------------------------- */
.house-label.sp-sub { margin: 14px 0 6px; }
.sp-missed { display: grid; gap: 10px; margin: 0; padding-left: 1.3rem; }
.sp-missed p { margin: 0; }
.sp-missed p + p { margin-top: 2px; font-size: 14px; color: var(--ink-3); }
.sp-practice { margin-top: 4px; }
