/* The upload module (score-upload.js), in the arch of the home page and the tool pages: one panel at a time,
   chosen by the module's own data-state, centred in the part of the arch below the dome. */
.score-upload { height: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--radius-s); transition: background-color .15s ease; }
.score-upload[data-state="idle"] [data-panel="idle"],
.score-upload[data-state="selected"] [data-panel="selected"],
.score-upload[data-state="sending"] [data-panel="sending"],
.score-upload[data-state="done"] [data-panel="done"],
.score-upload[data-state="failed"] [data-panel="failed"],
.score-upload[data-state="batch"] [data-panel="batch"] { display: flex; }
/* "Upload a score" links (#upload) land on the whole first screen: the hall is one viewport tall, so the arch is
   always in it, and scrolling to the top shows it with the words beside or above it. */
.score-upload { scroll-margin-top: 100vh; scroll-margin-top: 100dvh; }
/* Until the configuration answers, nothing shows rather than a button that changes a moment later. */
.score-upload[data-enabled="pending"] .panel { visibility: hidden; }
.score-upload[data-enabled="false"] [data-choose-file] { background: var(--vellum-deep); color: var(--ink-soft); opacity: 1; cursor: not-allowed; }
/* A PDF dragged over the page. */
.score-upload.is-over { background: rgba(201, 163, 78, 0.14); }
.score-upload.is-over .drop-page { color: var(--brass-deep); }

.score-upload .panel { width: 100%; min-height: 0; gap: 14px; }
.score-upload .panel-heading { width: 100%; }
.score-upload .panel-heading .step-label { display: block; margin-bottom: 5px; }
.score-upload .panel-title { max-width: 100%; font-size: 1.75rem; line-height: 1.1; }
.score-upload .panel-title:focus { box-shadow: none; }
.score-upload .panel-note, .score-upload .panel-body { font-size: 1rem; line-height: 1.4; }
.score-upload .panel-body strong { overflow-wrap: anywhere; }
.score-upload .file { margin: 2px 0; padding: 12px; }
.score-upload .file-icon { width: 28px; height: 36px; }
.score-upload .file-name, .score-upload .file-in { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.score-upload .file-in { font-size: 1rem; }
.score-upload .check { text-align: left; font-size: .9375rem; line-height: 1.35; }
.score-upload .field-error { margin: 0; width: 100%; font-size: .9375rem; line-height: 1.3; text-align: left; }
.score-upload [data-file-error] { text-align: center; }
.score-upload .btn--wide { margin-top: 0; }
/* The button's menu on a computer: PDF files, or a folder (upload-chooser.js). */
.choose { position: relative; display: inline-flex; }
.choose-menu { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5; display: flex; flex-direction: column; min-width: 13em; padding: 4px; }
/* Several PDFs: the list in its dialog; the arch keeps one line. */
.modal--batch { width: min(600px, calc(100vw - 32px)); padding-bottom: 26px; }
.modal--batch[open] { display: flex; flex-direction: column; }
.modal--batch .modal-title:focus { outline: none; box-shadow: none; }
.modal--batch .modal-lede { margin-bottom: 8px; }
.batch-progress { margin: 0 0 10px; font-size: .9375rem; color: var(--ink-soft); }
.batch-progress:empty, .batch-summary:empty { display: none; }
.batch-list { flex: 1 1 auto; min-height: 80px; overflow-y: auto; list-style: none; margin: 0 -6px 12px; padding: 0 6px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.batch-row { display: flex; flex-direction: column; padding: 9px 0; }
.batch-row + .batch-row { border-top: 1px solid var(--line-soft); }
.batch-name { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.batch-text { font-size: .9375rem; line-height: 1.35; color: var(--ink-soft); }
.batch-row[data-status="uploaded"] .batch-text { color: var(--myrtle); }
.batch-row:is([data-status="refused"], [data-status="rejected"], [data-status="failed"]) .batch-text { color: var(--rubric); }
.batch-summary { margin: 0 0 12px; font-size: .9375rem; color: var(--ink-soft); }
.batch-help { margin: -4px 0 12px; }
.modal--batch .check { margin-bottom: 12px; }
.modal--batch > .field-error { margin: -4px 0 12px; }
@media (max-width: 560px) { .modal--batch { padding: 30px 18px 20px; } }

.precheck-line { width: 100%; margin: 0; font-size: .9375rem; line-height: 1.3; text-align: left; color: var(--ink-soft); }
.step-label { font-size: .75rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }

@media (max-width: 760px) {
  .score-upload .panel-heading .step-label { display: none; }
  .score-upload .panel-title { font-size: 1.5rem; }
  .score-upload .panel { gap: 10px; }
}
/* Short screens keep the whole form inside the arch. */
@media (max-height: 780px) {
  .score-upload .panel-heading .step-label { display: none; }
  .score-upload .panel { gap: 10px; }
  .score-upload .panel-title { font-size: 1.4rem; }
  .score-upload .file { padding: 8px; }
  .score-upload .panel-note, .score-upload .panel-body, .score-upload .check { font-size: .875rem; }
}
@media (max-height: 520px) and (min-width: 560px) {
  .score-upload .file-icon, .score-upload .drop-page { display: none; }
  .score-upload .panel { gap: 6px; }
  .score-upload .panel-title { font-size: 1.25rem; }
  .score-upload .btn { min-height: 40px; }
}
