/* The "Upload your work" block of the start page (index.html, #home-uploads, assets/home-uploads.js).
   A .dash-block like Homework and Tips & feedback: the glass card itself (border, gloss strip, padding) and the .hw-pill / .hw-tag / .hw-rc
   pieces come from home-homework.css, which has to be loaded before this file. Scoped to html.ah, uses the colour variables of academy-home.css. */

html.ah .up-block[hidden] { display: none; }
html.ah .up-block [hidden] { display: none; }
html.ah .up-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
html.ah .up-block .up-title {
  font-family: var(--ah-head); font-weight: 700; font-size: 25px; line-height: 1.15; text-transform: lowercase; color: var(--ah-ink); margin: 5px 0 0;
}
html.ah .up-block ul { list-style: none; margin: 0; padding: 0; }
html.ah .up-block li { margin: 0; line-height: 1.4; }
html.ah .up-block li::marker { content: ''; }
html.ah .up-lead { margin: 0 0 6px; font: 400 15px/1.5 var(--ah-font); color: var(--ah-ink); }
html.ah .up-facts { margin: 0 0 16px; font: 400 13.5px/1.5 var(--ah-font); color: var(--ah-spn); }
html.ah .up-facts span { display: block; }
html.ah .up-sr {   /* read out by screen readers while a file is sent, not shown */
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- The file input stays in the page (keyboard, screen readers), only the drop zone is drawn ---------- */
html.ah .up-form { position: relative; }
html.ah .up-input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
html.ah .up-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 132px; padding: 22px 18px; text-align: center; cursor: pointer;
  border-radius: 22px; border: 2.5px dashed #35a4dd; color: var(--ah-ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(240, 248, 254, .55));
  box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(20, 60, 110, .12);
  transition: background .15s, border-color .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
html.ah .up-zone:hover, html.ah .up-over .up-zone {
  border-style: solid; border-color: var(--ah-blue); background: rgba(255, 255, 255, .95); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(25, 191, 242, .55), 0 0 14px rgba(var(--ah-glow), .55);
}
html.ah .up-zone.focus { outline: 3px solid var(--ah-focus); outline-offset: 3px; }
html.ah .up-zone-ic { display: inline-flex; color: #0b6bb3; }
html.ah .up-zone-t { font: 700 17px/1.3 var(--ah-head); color: var(--ah-ink); }
html.ah .up-zone-s { font: 400 13.5px/1.4 var(--ah-font); color: var(--ah-spn); }

/* ---------- A chosen file, and a file on its way ---------- */
html.ah .up-stage, html.ah .up-send {
  display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(240, 248, 254, .62));
  border: 1.5px solid rgba(255, 255, 255, .95); box-shadow: 0 0 0 1px rgba(53, 164, 221, .45), inset 0 -6px 12px -8px rgba(70, 105, 140, .3), 0 1px 3px rgba(20, 60, 110, .15);
}
html.ah .up-over .up-stage, html.ah .up-over .up-zone { box-shadow: 0 0 0 2px var(--ah-blue), 0 0 14px rgba(var(--ah-glow), .55); }
html.ah .up-pick { display: flex; align-items: center; gap: 12px; min-width: 0; }
html.ah .up-ic {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 13px; color: #06233f;
  border: 1.5px solid #1778b3; background: var(--ah-pill-a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -2px 4px rgba(20, 110, 170, .3);
}
html.ah .up-info { flex: 1 1 auto; min-width: 0; }
html.ah .up-name { font: 700 15.5px/1.3 var(--ah-font); color: var(--ah-ink); overflow-wrap: anywhere; }
html.ah .up-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 0; margin-top: 3px; font: 600 13px/1.4 var(--ah-font); color: var(--ah-spn); font-variant-numeric: tabular-nums; }
html.ah .up-meta > * + *::before { content: '\00b7'; margin: 0 7px; font-weight: 700; }
html.ah .up-meta > .up-lesson { display: flex; flex-basis: 100%; align-items: center; gap: 6px; margin-top: 3px; }   /* the lesson sits on its own line */
html.ah .up-meta > .up-lesson::before { content: none; }
html.ah .up-lesson .hw-tag { min-width: 28px; height: 20px; padding: 0 7px; font-size: 11.5px; }

html.ah .up-field { display: flex; flex-direction: column; gap: 6px; }
html.ah .up-field label { font: 700 14px/1.3 var(--ah-font); color: var(--ah-ink); }
html.ah .up-select, html.ah .up-text {
  width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid #35a4dd; color: var(--ah-ink);
  font: 400 15px/1.4 var(--ah-font); background: rgba(255, 255, 255, .92); box-shadow: inset 0 2px 4px rgba(13, 51, 88, .12);
}
html.ah .up-text { resize: vertical; min-height: 84px; }
html.ah .up-text::placeholder { color: #4f6b86; opacity: 1; }
html.ah .up-select:focus-visible, html.ah .up-text:focus-visible { outline: 3px solid var(--ah-focus); outline-offset: 1px; border-color: var(--ah-focus); }
html.ah .up-count { align-self: flex-end; font: 600 12.5px/1 var(--ah-font); color: var(--ah-spn); font-variant-numeric: tabular-nums; }
html.ah .up-hint { margin: 0; font: 400 13.5px/1.5 var(--ah-font); color: var(--ah-ink-soft); }

html.ah .up-progress {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 14px; border: 0; border-radius: 99px; overflow: hidden;
  background: rgba(13, 51, 88, .18); box-shadow: inset 0 1px 3px rgba(13, 51, 88, .35);
}
html.ah .up-progress::-webkit-progress-bar { background: rgba(13, 51, 88, .18); border-radius: 99px; }
html.ah .up-progress::-webkit-progress-value { border-radius: 99px; background: linear-gradient(180deg, #b4ee8a, #63cf2e 55%, #4cb91c); box-shadow: 0 0 6px rgba(var(--ah-green-glow), .8); }
html.ah .up-progress::-moz-progress-bar { border-radius: 99px; background: linear-gradient(180deg, #b4ee8a, #63cf2e 55%, #4cb91c); }
html.ah .up-pct { margin: 0; font: 600 14.5px/1.3 var(--ah-font); color: var(--ah-ink); font-variant-numeric: tabular-nums; }

/* ---------- Buttons (the same glass pills as Homework, a comfortable 44px high) ---------- */
html.ah .up-acts { display: flex; flex-wrap: wrap; gap: 8px; }
html.ah .up-btn {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 44px; padding: 0 20px; border-radius: 99px; cursor: pointer;
  border: 1.5px solid #35a4dd; color: var(--ah-ink); text-decoration: none; font: 600 14.5px/1.2 var(--ah-font); background: var(--ah-pill); box-shadow: var(--ah-pill-sh);
  transition: background .15s, border-color .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent;
}
html.ah .up-btn:hover { color: var(--ah-ink); border-color: #1f8fcf; background: var(--ah-pill-h); box-shadow: var(--ah-pill-sh-h); }
html.ah .up-btn:active { background: var(--ah-pill-a); border-color: #1778b3; box-shadow: inset 0 2px 4px rgba(0, 60, 110, .35); }
html.ah .up-btn.primary { font-weight: 700; color: #06233f; border-color: #1778b3; background: var(--ah-pill-a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -2px 4px rgba(20, 110, 170, .3), 0 1px 3px rgba(20, 100, 160, .25); }
html.ah .up-btn.primary:hover { background: linear-gradient(180deg, #bfe6fa 0%, #8fd2f3 49%, #62bdea 50%, #8fd5f3 100%); box-shadow: inset 0 1px 0 #fff, 0 0 8px rgba(80, 200, 255, .6); }
html.ah .up-btn.danger { color: #6b1010; border-color: #c25b5b; }
html.ah .up-btn.danger:hover { color: #6b1010; border-color: #a83a3a; background: linear-gradient(180deg, #fff 0%, #fde3e3 49%, #f8c9c9 50%, #fcdada 100%); box-shadow: inset 0 1px 0 #fff, 0 0 8px rgba(220, 90, 90, .45); }
html.ah .up-btn:disabled { cursor: default; opacity: .6; }

/* ---------- Messages ---------- */
html.ah .up-msg, html.ah .up-err {
  margin: 12px 0 0; padding: 11px 14px; border-radius: 16px; font: 600 14.5px/1.45 var(--ah-font); overflow-wrap: anywhere;
}
html.ah .up-msg { color: #14400a; border: 1.5px solid var(--ah-green); background: var(--ah-fill-green); box-shadow: inset 0 1px 0 #fff; }
html.ah .up-err { color: #6b1010; border: 1.5px solid #c25b5b; background: linear-gradient(180deg, #fff6f6, #fde7e7); box-shadow: inset 0 1px 0 #fff; }
html.ah .up-cerr { margin: 8px 0 0; }
html.ah .up-loaderr { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
html.ah .up-loaderr p { margin: 0; font: 400 15px/1.5 var(--ah-font); color: var(--ah-ink); }

/* ---------- The list ---------- */
html.ah .up-listwrap { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(13, 51, 88, .16); }
html.ah .up-lh { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font: 700 18px/1.2 var(--ah-head); text-transform: lowercase; color: var(--ah-ink); }
html.ah .up-list { display: flex; flex-direction: column; gap: 10px; }
html.ah .up-empty { margin: 0; font: 400 14.5px/1.5 var(--ah-font); color: var(--ah-ink-soft); }
html.ah .up-item {
  padding: 12px; border-radius: 20px; background: linear-gradient(180deg, rgba(255, 255, 255, .75), rgba(240, 248, 254, .6));
  border: 1.5px solid rgba(255, 255, 255, .95); box-shadow: 0 0 0 1px rgba(53, 164, 221, .45), inset 0 -6px 12px -8px rgba(70, 105, 140, .3), 0 1px 3px rgba(20, 60, 110, .15);
  transition: box-shadow .25s;
}
html.ah .up-item.up-hl { box-shadow: 0 0 0 3px var(--ah-blue), 0 0 18px rgba(var(--ah-glow), .7), inset 0 -6px 12px -8px rgba(70, 105, 140, .3); }
html.ah .up-row { display: flex; align-items: flex-start; gap: 12px; }
html.ah .up-comment { margin: 6px 0 0; font: 400 14px/1.45 var(--ah-font); color: var(--ah-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
html.ah .up-cl { font-weight: 700; color: var(--ah-spn); }
html.ah .up-stat { flex: none; max-width: 46%; }
html.ah .up-item .up-acts { margin-top: 12px; }

/* the status pill: .hw-pill with a small dot (amber waiting, blue seen, green feedback) */
html.ah .up-status { position: relative; white-space: normal; text-align: left; line-height: 1.25; padding-top: 4px; padding-bottom: 4px; text-decoration: none; }
html.ah .up-dot { flex: none; width: 10px; height: 10px; border-radius: 99px; border: 1.5px solid #b87a0a; background: linear-gradient(180deg, #ffe9a8, #f0b43a); }
html.ah .up-status.st-seen .up-dot { border-color: #1778b3; background: var(--ah-pill-a); }
html.ah .up-status.st-reviewed .up-dot { border-color: #3f9d17; background: linear-gradient(180deg, #d4f6b8, #6fd236); }
html.ah a.up-status { cursor: pointer; transition: box-shadow .15s; }
html.ah a.up-status::after { content: ''; position: absolute; left: 0; right: 0; top: -8px; bottom: -8px; }   /* a bigger target for a finger */
html.ah a.up-status:hover { color: var(--ah-ink); box-shadow: inset 0 1px 0 #fff, inset 0 -2px 4px rgba(120, 210, 70, .5), 0 0 10px rgba(var(--ah-green-glow), .8); }

/* delete confirm */
html.ah .up-confirm { margin-top: 12px; padding: 12px 14px; border-radius: 16px; border: 1.5px solid #c25b5b; background: linear-gradient(180deg, #fff6f6, #fde9e9); }
html.ah .up-confirm > p:first-child { margin: 0 0 10px; font: 600 14.5px/1.45 var(--ah-font); color: #6b1010; }
html.ah .up-confirm:focus { outline: none; }

/* preview */
html.ah .up-preview { margin-top: 12px; }
html.ah .up-media { display: block; max-width: 100%; border-radius: 14px; border: 1.5px solid rgba(53, 164, 221, .55); background: #fff; }
html.ah .up-img { max-height: 420px; width: auto; height: auto; margin: 0 auto; object-fit: contain; }
html.ah .up-audio { width: 100%; border: 0; background: transparent; }
html.ah .up-video { width: 100%; max-height: 70vh; background: #000; }
html.ah .up-pverr { margin: 0; padding: 10px 14px; border-radius: 14px; font: 600 14px/1.45 var(--ah-font); color: #6b1010; border: 1.5px solid #c25b5b; background: #fdeeee; }

/* Rowan's notes under the player: a time in them is a button that jumps the player there */
html.ah .up-notes { margin-top: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(53, 164, 221, .5); }
html.ah .up-nh { margin: 0 0 8px; font: 700 14px/1.2 var(--ah-font); color: var(--ah-ink); }
html.ah .up-nlist { display: flex; flex-direction: column; gap: 8px; }
html.ah .up-note { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
html.ah .up-nk { font: 700 11px/1 var(--ah-font); letter-spacing: .08em; text-transform: uppercase; color: var(--ah-spn); }
html.ah .up-nt { margin: 0; font: 400 14.5px/1.7 var(--ah-font); color: var(--ah-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
html.ah .up-nhint { margin: 8px 0 0; font: 400 13px/1.4 var(--ah-font); color: var(--ah-spn); }
html.ah .up-ts {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; margin: 0 1px; border-radius: 99px; cursor: pointer; vertical-align: baseline;
  font: 700 13px/1.2 var(--ah-font); font-variant-numeric: tabular-nums; color: #06233f;
  border: 1.5px solid #1778b3; background: var(--ah-pill-a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -2px 4px rgba(20, 110, 170, .3);
  transition: box-shadow .15s;
}
html.ah .up-ts:hover { box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(25, 191, 242, .9), 0 0 10px rgba(var(--ah-glow), .55); }
html.ah .up-ts:focus-visible { outline: 3px solid var(--ah-focus); outline-offset: 2px; }

@media (max-width: 560px) {
  html.ah .up-head { margin-bottom: 8px; padding: 0 4px; }
  html.ah .up-block .up-title { font-size: 22px; }
  html.ah .up-lead, html.ah .up-facts { padding: 0 4px; }
  html.ah .up-zone { min-height: 118px; padding: 18px 12px; }
  html.ah .up-stage, html.ah .up-send { padding: 14px 12px; }
  html.ah .up-listwrap { padding: 16px 4px 0; }
  html.ah .up-item { padding: 12px 10px; }
  html.ah .up-row { flex-wrap: wrap; }
  html.ah .up-info { flex-basis: calc(100% - 56px); }
  html.ah .up-stat { max-width: none; flex-basis: 100%; padding-left: 52px; box-sizing: border-box; }
  html.ah .up-acts .up-btn { flex: 1 1 74px; padding: 0 6px; font-size: 14px; }
  html.ah .up-usage { padding: 0 4px; }
}
html.ah .up-usage { margin: 16px 0 0; font: 600 13.5px/1.4 var(--ah-font); color: var(--ah-spn); font-variant-numeric: tabular-nums; }
html.ah .up-formats { margin-top: 1px; }

/* ---------- Admin preview: the badge line, and the switched-off drop zone ---------- */
html.ah .up-adm {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 14px; padding: 8px 14px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 251, 232, .92), rgba(255, 238, 180, .7)); border: 1.5px solid #d99a1c;
  box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(150, 100, 10, .2);
}
html.ah .up-adm-b {
  display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 99px; flex: none;
  font: 700 11px/1 var(--ah-font); letter-spacing: .1em; text-transform: uppercase; color: #fff;
  border: 1.5px solid #0a2a48; background: linear-gradient(180deg, #2a72b0 0%, #1d5a93 49%, #0d3358 50%, #164a7d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}
html.ah .up-adm-t { flex: 1 1 240px; min-width: 0; font: 600 13.5px/1.45 var(--ah-font); color: #4a2f00; }
html.ah .up-zone.off, html.ah .up-zone.off:hover { cursor: default; opacity: .7; border-style: dashed; border-color: #35a4dd; background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(240, 248, 254, .55)); box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(20, 60, 110, .12); }

@media (prefers-reduced-motion: reduce) {
  html.ah .up-zone, html.ah .up-btn, html.ah .up-item, html.ah a.up-status, html.ah .up-ts { transition: none; }
}
@media (forced-colors: active) {
  html.ah .up-zone, html.ah .up-stage, html.ah .up-send, html.ah .up-item, html.ah .up-btn, html.ah .up-ic, html.ah .up-media, html.ah .up-ts { border: 1px solid CanvasText; }
  html.ah .up-progress { border: 1px solid CanvasText; }
}
