/* ===================================================================
   dropbox.css — 📬 Homework Drop Box (pairs with dropbox.js).
   Notes-engine module: a compact, quiet card stack that sits INSIDE
   a note section — no page chrome. All selectors hwd- prefixed; loads
   after notes.css and leans on its variables (same deal as rps.css).
   Primary touch targets stay ≥44px; the register table collapses to
   stacked rows on small screens.
   =================================================================== */

.hwd-root{max-width:640px;margin:0 auto;font-family:var(--font,Poppins,sans-serif);font-size:15px;line-height:1.5;color:var(--ink,#15233f)}
.hwd-root button{font-family:inherit;cursor:pointer;border:none;background:none;touch-action:manipulation}
.hwd-root input,.hwd-root textarea,.hwd-mwrap input,.hwd-mwrap textarea{font-family:inherit;font-size:inherit;color:inherit}

/* quiet states: loading / degraded / fallback */
.hwd-idle{text-align:center;font-size:14px;font-weight:600;color:var(--muted,#5c6b86);padding:18px 14px;border:1.5px dashed var(--line-2,#d8e1ee);border-radius:14px;background:#fbfcfe}
.hwd-spin{display:inline-block;width:16px;height:16px;border-radius:50%;margin-right:9px;vertical-align:-3px;border:2.5px solid var(--line-2,#d8e1ee);border-top-color:var(--navy,#1f3360);animation:hwdspin .7s linear infinite}
@keyframes hwdspin{to{transform:rotate(360deg)}}

/* signed-out fallback (the notes gate mostly guarantees signed-in) */
.hwd-gate{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#fff;border:1px solid var(--line-2,#d8e1ee);border-radius:14px;padding:14px 16px;box-shadow:var(--shadow,0 8px 22px -14px rgba(22,41,74,.18))}
.hwd-gate-ico{font-size:22px}
.hwd-gate-tx{flex:1;min-width:200px;font-size:13.5px;color:var(--muted,#5c6b86)}
.hwd-gate-tx b{color:var(--navy,#1f3360)}

/* buttons */
.hwd-btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;border-radius:10px;font-size:14.5px;font-weight:700;letter-spacing:.01em;background:var(--navy,#1f3360);color:#fff;transition:background .15s,opacity .15s;text-decoration:none;padding:0 16px}
.hwd-btn:hover{background:var(--navy-2,#2c4478);text-decoration:none}
.hwd-btn:disabled{opacity:.55;cursor:not-allowed}
.hwd-btn.ghost{background:#fff;color:var(--navy,#1f3360);border:1.5px solid var(--line-2,#d8e1ee)}
.hwd-btn.ghost:hover{background:#f4f7fb}
.hwd-btn-sm{min-height:44px;font-size:13px;width:auto;display:inline-flex;padding:0 16px}

/* the caught-up line */
.hwd-caught{background:#ecf9f2;border:1px solid #cdeeda;color:#1d6b4f;border-radius:12px;padding:14px 16px;text-align:center;font-size:13.5px;font-weight:600;margin-bottom:12px}

/* assignment cards — compact quiet look inside the note */
.hwd-card{background:#fff;border:1px solid var(--line-2,#d8e1ee);border-radius:14px;margin-bottom:12px;overflow:hidden;box-shadow:var(--shadow,0 8px 22px -16px rgba(22,41,74,.16))}
.hwd-head{display:block;width:100%;text-align:left;padding:15px 16px 13px;color:inherit;font:inherit}
.hwd-head.tappable{cursor:pointer;min-height:44px}
.hwd-head.tappable:hover{background:#fbfcfe}
.hwd-title{font-size:15px;font-weight:700;color:var(--navy,#1f3360);letter-spacing:-.01em;line-height:1.3}
.hwd-notes{font-size:12.5px;color:var(--muted,#5c6b86);margin-top:3px;line-height:1.45}
.hwd-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.hwd-chip{font-size:11px;font-weight:600;border-radius:99px;padding:4px 10px;border:1px solid var(--line-2,#d8e1ee);color:var(--muted,#5c6b86);background:#fff}
.hwd-chip.due{color:var(--navy-2,#2c4478)}
.hwd-chip.late{color:#b06f00;background:var(--gold-soft,#fff7e8);border-color:var(--gold-line,#f0dcb4)}
.hwd-chip.none{color:var(--soft,#95a2ba)}
.hwd-chip.closed{color:var(--soft,#95a2ba);background:#f4f6f9}
.hwd-status{margin-top:10px;font-size:12.5px;font-weight:600}
.hwd-status.none{color:var(--soft,#95a2ba)}
.hwd-status.ok{color:#1d6b4f}
.hwd-late{font-size:10px;font-weight:700;color:#b06f00;background:var(--gold-soft,#fff7e8);border:1px solid var(--gold-line,#f0dcb4);border-radius:6px;padding:1px 6px;margin-left:6px;vertical-align:1px}

/* drop zone */
.hwd-body{padding:0 16px 16px;border-top:1px dashed var(--line,#e7edf5)}
.hwd-dz{margin-top:14px;border:1.5px dashed #c3cfe2;border-radius:11px;background:#fbfcfe;padding:22px 14px;text-align:center;cursor:pointer;transition:border-color .15s,background .15s;min-height:44px}
.hwd-dz.over{border-color:var(--navy,#1f3360);background:#f0f4fa}
.hwd-dz .dzico{font-size:22px;margin-bottom:4px}
.hwd-dz b{display:block;font-size:13.5px;color:var(--navy,#1f3360)}
.hwd-dz small{display:block;font-size:12px;color:var(--soft,#95a2ba);margin-top:2px}
.hwd-dz input[type=file]{display:none}
.hwd-pick{display:flex;align-items:center;gap:10px;margin-top:12px;padding:10px 12px;border:1px solid var(--line-2,#d8e1ee);border-radius:9px;background:#fff}
.hwd-pick .pico{font-size:18px}
.hwd-pick .pname{flex:1;min-width:0;font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hwd-pick .psize{font-size:12px;color:var(--muted,#5c6b86);white-space:nowrap}
.hwd-pick .pclear{font-size:16px;color:var(--soft,#95a2ba);padding:6px 10px;min-height:44px;min-width:44px}
.hwd-pick .pclear:hover{color:#e05252}
.hwd-handin{margin-top:12px}
.hwd-msg{font-size:12.5px;font-weight:500;line-height:1.45;border-radius:8px;padding:10px 13px;margin-top:10px}
.hwd-msg.error{color:#8f2d2d;background:#fdf1f1;border-left:3px solid #e05252}
.hwd-msg.success{color:#1d6b4f;background:#ecf9f2;border-left:3px solid #27a874}
.hwd-msg[hidden]{display:none}
.hwd-replrow{display:flex;justify-content:center;margin-top:10px}
.hwd-linky{font-size:13px;font-weight:600;color:var(--navy,#1f3360);text-decoration:underline;text-underline-offset:2px;padding:10px;min-height:44px}

/* past assignments */
.hwd-past{margin-top:18px}
.hwd-past>summary{cursor:pointer;list-style:none;font-size:13px;font-weight:600;color:var(--muted,#5c6b86);padding:12px 4px;border-top:1px solid var(--line,#e7edf5);display:flex;align-items:center;gap:8px;min-height:44px}
.hwd-past>summary::-webkit-details-marker{display:none}
.hwd-past>summary .tri{transition:transform .15s;font-size:10px;color:var(--soft,#95a2ba)}
.hwd-past[open]>summary .tri{transform:rotate(90deg)}
.hwd-pastlist{margin-top:10px}
.hwd-pastlist .hwd-card{opacity:.86}

/* admin */
.hwd-adminbar{display:flex;justify-content:flex-end;margin-bottom:12px}
.hwd-adminbar[hidden]{display:none}
.hwd-areg{border-top:1px solid var(--line,#e7edf5);padding:10px 16px 14px;background:#fbfcfe}
.hwd-aregbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.hwd-aregbar .cnt{font-size:12px;color:var(--muted,#5c6b86);font-weight:600;flex:1}
.hwd-tbtn{font-size:12px;font-weight:600;color:var(--navy,#1f3360);background:#fff;border:1px solid var(--line-2,#d8e1ee);border-radius:8px;padding:8px 11px;min-height:36px}
.hwd-tbtn:hover{background:#f4f7fb}
.hwd-tbtn:disabled{opacity:.5;cursor:not-allowed}
.hwd-regtable{width:100%;border-collapse:collapse;margin-top:10px;font-size:12px}
.hwd-regtable th{text-align:left;font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--soft,#95a2ba);padding:6px 8px 4px;border-bottom:1px solid var(--line,#e7edf5)}
.hwd-regtable td{padding:8px;border-bottom:1px solid var(--line,#e7edf5);vertical-align:middle}
.hwd-regtable .rn b{display:block;font-weight:600;color:var(--ink,#15233f)}
.hwd-regtable .rn small{color:var(--soft,#95a2ba);font-size:11px}
.hwd-regtable .rf{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hwd-regtable .ract{white-space:nowrap;text-align:right}
.hwd-ibtn{font-size:14px;padding:7px 9px;border:1px solid var(--line-2,#d8e1ee);border-radius:8px;background:#fff;min-height:36px;min-width:36px}
.hwd-ibtn:hover{background:#f4f7fb}
.hwd-zipmsg{font-size:12px;color:var(--muted,#5c6b86);margin-top:8px;font-weight:600}
.hwd-zipmsg[hidden]{display:none}
@media(max-width:520px){
  .hwd-regtable thead{display:none}
  .hwd-regtable,.hwd-regtable tbody,.hwd-regtable tr,.hwd-regtable td{display:block;width:100%}
  .hwd-regtable tr{border-bottom:1px solid var(--line,#e7edf5);padding:8px 0}
  .hwd-regtable td{border:none;padding:2px 4px}
  .hwd-regtable .ract{text-align:left;padding-top:6px}
  .hwd-regtable .rf{max-width:none}
}

/* modals (appended to body by dropbox.js) */
.hwd-mwrap{position:fixed;inset:0;background:rgba(15,27,45,.5);display:flex;align-items:center;justify-content:center;padding:16px;z-index:200;font-family:var(--font,Poppins,sans-serif)}
.hwd-mwrap[hidden]{display:none}
.hwd-mcard{background:#fff;border-radius:14px;width:100%;max-width:440px;max-height:92vh;overflow:auto;padding:22px 20px;box-shadow:0 22px 45px -20px rgba(22,41,74,.4)}
.hwd-mcard h3{font-size:16px;font-weight:700;color:var(--navy,#1f3360);margin:0 0 14px;letter-spacing:-.01em}
.hwd-mcard button{font-family:inherit;cursor:pointer;border:none;background:none;touch-action:manipulation}
.hwd-pvcard{background:#fff;border-radius:12px;width:100%;max-width:760px;height:82vh;display:flex;flex-direction:column;overflow:hidden}
.hwd-pvcard .pvhead{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--line,#e7edf5)}
.hwd-pvcard .pvt{flex:1;font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hwd-pvcard .pvclose{font-size:18px;color:var(--muted,#5c6b86);padding:6px 12px;min-height:44px;cursor:pointer;border:none;background:none}
.hwd-pvcard iframe{flex:1;width:100%;border:0;background:#fff}
.hwd-field{display:flex;flex-direction:column;gap:5px;margin-bottom:12px}
.hwd-field label{font-size:12px;font-weight:600;color:var(--navy-2,#2c4478)}
.hwd-field input,.hwd-field textarea{width:100%;min-height:44px;padding:10px 14px;font-size:14px;background:#fff;border:1.5px solid var(--line-2,#d8e1ee);border-radius:9px;-webkit-appearance:none;appearance:none;box-sizing:border-box}
.hwd-field textarea{resize:vertical;min-height:64px}
.hwd-field input:focus,.hwd-field textarea:focus{outline:none;border-color:var(--navy,#1f3360);box-shadow:0 0 0 3px rgba(31,51,96,.10)}
.hwd-frow{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.hwd-switchrow{display:flex;align-items:center;gap:10px;margin:4px 0 14px;min-height:44px}
.hwd-switchrow input{width:18px;height:18px;accent-color:var(--navy,#1f3360)}
.hwd-switchrow label{font-size:13.5px;font-weight:600;color:var(--navy-2,#2c4478)}
.hwd-mbtns{display:flex;gap:10px;margin-top:6px}

@media (prefers-reduced-motion: reduce){
  .hwd-spin{animation-duration:1.5s}
  .hwd-dz,.hwd-past>summary .tri{transition:none}
}
