/* AiB Platform — upload: the drop zone and the file queue under it.
   The zone is a <label> around a real file input, so a click, a tap,
   Enter/Space on the focused input and a no-JS form post all work; the
   runtime adds drag-and-drop (.is-over while a file hovers it). The queue
   lists what was picked, each row with a status dot and the same status
   in words. */

/* ---------- drop zone ---------- */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 200px;
  padding: var(--space-7) var(--space-6);
  border: 1.5px dashed var(--hairline-strong);
  border-radius: var(--radius);
  background: var(--paper);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.dropzone:hover,
.dropzone.is-over { border-color: var(--ink); }
.dropzone.is-over { background: var(--white); }
/* the input is the focus target; the zone wears its ring */
.dropzone:has(.dropzone-input:focus-visible) { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 2px; }
.dropzone:has(.dropzone-input:disabled) { opacity: 0.5; cursor: not-allowed; }
.dropzone:has(.dropzone-input:disabled):hover { border-color: var(--hairline-strong); }
/* present to the keyboard and screen readers, absent from the canvas
   (never display:none — that would drop it from the tab order) */
.dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.dropzone-title {
  font-family: var(--font-display);
  font-weight: 640;
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
}
.dropzone-sub { max-width: 44ch; color: var(--grey); font-size: var(--fs-md); }
/* "choose files" — the link-voiced word inside the sub line */
.dropzone-pick { color: var(--ink); border-bottom: 1px solid currentColor; }
.dropzone-formats {
  margin-top: 6px;
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ---------- file queue ---------- */
.file-queue { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.file-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: var(--fs-md);
}
/* the row the stage is showing */
.file-row[aria-current="true"] { border-color: var(--ink); }
.file-row-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.file-row-meta {
  flex: 0 0 auto;
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- phones ---------- */
@media (max-width: 719px) {
  .dropzone { min-height: 160px; padding: var(--space-6) var(--space-4); }
}
/* smallest: the status words drop under the name, aligned past the dot */
@media (max-width: 560px) {
  .file-row { flex-wrap: wrap; row-gap: 2px; }
  .file-row-meta { flex-basis: 100%; padding-left: var(--space-5); white-space: normal; }
}
