/* --- Upload --------------------------------------------------------------------------------------- */

.quota { max-width: 48rem; margin: var(--space-5) 0 var(--space-6); }
.quota-text { margin-bottom: var(--space-2); color: var(--fg-muted); font-size: var(--meta); }
.quota-bar { height: 6px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.quota-fill {
  display: block;
  height: 100%;
  width: calc(var(--fill, 0) * 100%);
  background: var(--accent);
  border-radius: inherit;
  transition: width .2s var(--ease);
}
.quota[data-level="high"] .quota-fill { background: var(--danger); }

/* The drop zone is a panel (a surface with a hairline edge, not a dashed box): the
   control in it is the Choose files button, so its edge is decoration. A file held over
   it gives it a 2px brass edge (the border plus an inset ring, so nothing moves) on
   --accent-soft, and its title says "Drop to upload" (upload.js): words, not colour
   alone. */
.dropzone {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  max-width: 48rem;
  padding: clamp(2rem, 6vw, 3.5rem) var(--space-5);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  transition: border-color var(--motion) var(--ease), background-color var(--motion) var(--ease);
}
.dropzone.is-over { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
/* The icon in a round chip, as in an empty state. */
.dropzone-icon {
  width: 3.5rem;
  height: 3.5rem;
  padding: .875rem;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--fg);
}
.dropzone-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-stretch: 115%;
  font-size: var(--step-1);
}
.dropzone-hint { margin: 0; color: var(--fg-muted); font-size: var(--meta); max-width: 30rem; }

.upload-summary { max-width: 48rem; margin: var(--space-5) 0 0; }
.upload-summary:empty { display: none; }
.upload-list { list-style: none; margin: var(--space-4) 0 0; padding: 0; max-width: 48rem; display: grid; gap: var(--space-2); }
.upload-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "name size cancel"
    "bar bar bar"
    "status status status";
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}
/* Filenames are attacker-controlled: isolated, so a bidi override cannot reorder
   the text around them. */
.upload-name {
  grid-area: name;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  unicode-bidi: isolate;
}
.upload-size { grid-area: size; color: var(--fg-muted); font-size: var(--text-sm); }
.upload-item progress { grid-area: bar; }
.upload-item .btn { grid-area: cancel; }
.upload-status { grid-area: status; color: var(--fg-muted); font-size: var(--meta); }
.upload-item[data-state="done"] .upload-status { color: var(--fg); }
.upload-item[data-state="failed"] .upload-status { color: var(--danger); }
