/* The Class Monitor (class-monitor.js). Two places: her workbook (the recorder strip, her teacher's note) and the
   teacher's small monitor window. Prefixed mon- because the app's own .cm-* classes are the Classroom Manager's. */

/* ---- Her workbook: a strip at the top of her sticky header while her teacher's monitor is open (Tim, D2: "a red
   blinking at the top that reminds of a recorder"). Inside the header, so pinned reading tools measure it. */
.mon-live{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px 12px;padding:5px 16px;background:#fbf1ef;border-bottom:1px solid #f0d9d4;color:#5b2a22;font:500 13px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;text-align:center}
.mon-live-text{display:inline-flex;align-items:center;gap:0}
.mon-rec{width:9px;height:9px;border-radius:50%;background:#d4321e;box-shadow:0 0 0 3px #d4321e26;animation:mon-rec 1.6s ease-in-out infinite;flex:none}
@keyframes mon-rec{0%,100%{opacity:1}50%{opacity:.25}}
@media (prefers-reduced-motion:reduce){.mon-rec{animation:none}}
.mon-live .info-dot{border-color:#e2b4ab;color:#8a3a2d}
.mon-full{border:1px solid #c98b80;border-radius:999px;background:#fff;color:#5b2a22;padding:2px 12px;font:600 12px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;cursor:pointer}
.mon-full:hover,.mon-full:focus-visible{background:#fff6f4;border-color:#a95f52}
.mon-live-info{flex-basis:100%;margin:0;color:#6b3a31;font-size:12.5px}

/* Her teacher's note: centered, and it stays until she presses OK. */
/* Centered whatever the page's own dialog rules say (the student styles pin dialogs elsewhere). */
.mon-note{position:fixed;inset:0;margin:auto;height:fit-content;max-height:calc(100dvh - 32px);overflow:auto;width:min(440px,calc(100vw - 32px));padding:28px 28px 22px;border:0;border-top:4px solid #d4321e;border-radius:12px;background:#fffdf9;color:#26261f;box-shadow:0 18px 60px #0004;text-align:left}
.mon-note::backdrop{background:#1b1a1580}
.mon-note article+article{margin-top:18px;padding-top:16px;border-top:1px solid #eee8dc}
.mon-note-from{margin:0 0 8px;color:#6d6a5f;font:500 13px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
.mon-note-body{margin:0;font:400 22px/1.4 Georgia,"Times New Roman",serif;white-space:pre-wrap;overflow-wrap:anywhere}
.mon-ok{display:block;margin:22px 0 0 auto;min-width:96px;min-height:44px;padding:8px 22px;border:0;border-radius:999px;background:#3d626d;color:#fff;font:600 15px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;cursor:pointer}
.mon-ok:hover,.mon-ok:focus-visible{background:#2f4f58}

/* ---- The teacher's monitor window (Picture-in-Picture or a pop-up): its own document, so everything it needs. */
.mon-window{margin:0;background:#fafaf7;color:#26261f;font:14px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;-webkit-font-smoothing:antialiased}
.mon{padding:14px 14px 18px}
.mon-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 10px}
.mon-head h1{margin:0;font:400 20px/1.2 Georgia,"Times New Roman",serif;overflow-wrap:anywhere}
.mon .info-dot{display:inline-grid;place-items:center;position:relative;top:-.6em;width:13px;height:13px;margin-left:3px;padding:0;border:1px solid #9ab8c2;border-radius:50%;background:#fff;color:#3d626d;font:700 8.5px/1 Georgia,serif;cursor:pointer;vertical-align:baseline}
.mon-hide{flex:none;border:1px solid #cfd3cb;border-radius:999px;background:#fff;color:#3d626d;padding:4px 12px;font:600 12.5px/1.4 inherit;cursor:pointer}
.mon-hide[aria-pressed=true]{background:#3d626d;border-color:#3d626d;color:#fff}
.mon-what{margin:-4px 0 12px;color:#4d5a5e;font-size:12.5px}
.mon-counts{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px;padding:0;list-style:none}
.mon-counts li{display:inline-flex;align-items:center;gap:6px;padding:4px 10px 4px 8px;border-radius:999px;background:#fff;border:1px solid #e3e3db;font-size:12.5px;color:#4b4a42}
.mon-counts li::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--mon-c)}
.mon-counts b{font-size:14px;color:#26261f}
.mon-counts.is-big{flex-direction:column;gap:10px}
.mon-counts.is-big li{justify-content:flex-start;gap:12px;padding:14px 16px;border-radius:12px;font-size:16px}
.mon-counts.is-big li::before{width:16px;height:16px}
.mon-counts.is-big b{font:400 34px/1 Georgia,"Times New Roman",serif;min-width:1.6em}
.mon-window [data-s=g]{--mon-c:#2f9a57}.mon-window [data-s=y]{--mon-c:#e0a91b}.mon-window [data-s=r]{--mon-c:#d4321e}.mon-window [data-s=wait]{--mon-c:#c9c9c0}
.mon-counts li.is-away::before{background:transparent;box-shadow:inset 0 0 0 2px #d4321e}
.mon-status{margin:0 0 10px;color:#6d6a5f;font-size:12.5px}
.mon-list{margin:0;padding:0;list-style:none;border-top:1px solid #ebebe3}
.mon-girl{border-bottom:1px solid #ebebe3}
.mon-row{display:grid;grid-template-columns:12px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;padding:9px 4px;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.mon-row:hover,.mon-row[aria-expanded=true]{background:#f2f2ec}
.mon-dot{width:11px;height:11px;border-radius:50%;background:var(--mon-c)}
.mon-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.mon-why{color:#5d5b52;font-size:12.5px;text-align:right;white-space:nowrap}
.mon-why small{display:block;color:#3d626d;font-size:11.5px}
.mon-girl[data-s=r] .mon-why{color:#a3291a}
.mon-compose{padding:4px 4px 12px 26px}
.mon-presets{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}
.mon-presets button{border:1px solid #cfd3cb;border-radius:999px;background:#fff;color:#2f4f58;padding:4px 10px;font:500 12.5px/1.35 inherit;cursor:pointer;text-align:left}
.mon-presets button:hover,.mon-presets button:focus-visible{border-color:#3d626d}
.mon-line{display:flex;gap:6px}
.mon-line input{flex:1;min-width:0;padding:7px 10px;border:1px solid #cfd3cb;border-radius:8px;font:inherit;font-size:16px}
.mon-line button{flex:none;border:0;border-radius:8px;background:#3d626d;color:#fff;padding:7px 14px;font:600 13.5px/1 inherit;cursor:pointer}
.mon-line button:disabled,.mon-presets button:disabled{opacity:.55;cursor:default}
.mon-only{margin:6px 0 0;color:#6d6a5f;font-size:12px}
.mon-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.mon-empty{padding:16px 4px;color:#6d6a5f}
/* The Monitor button in her class bar: quiet, beside the class picker; the page's own action stays the CTA. */
.mon-open{display:inline-flex;align-items:center;gap:6px;border:1px solid #cfd3cb;border-radius:999px;background:#fff;color:#3d626d;padding:5px 12px;font:600 13px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;cursor:pointer}
.mon-open:hover,.mon-open:focus-visible{border-color:#3d626d}
.teacher-bar-pick{display:inline-flex;align-items:center;flex-wrap:wrap;gap:8px 12px}
/* No Picture-in-Picture and no pop-up: the same monitor as a panel on her own page. */
.mon-panel{position:fixed;top:12px;right:12px;bottom:12px;z-index:60;width:340px;max-width:calc(100vw - 24px);overflow:auto;border:1px solid #dcdcd2;border-radius:14px;box-shadow:0 14px 44px #0003}
.mon-x{flex:none;width:30px;height:30px;border:0;border-radius:50%;background:#efefe8;color:#3b3b33;font:400 20px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;cursor:pointer}
.mon-head .mon-hide{margin-left:auto}
