/* Documents: the drop zone, the library register and the library pick that
   sits under every input row. Drawn from the artboards in
   docs/design/suggestions/ (Documents.dc.html, DocumentsEmpty.dc.html and the
   pick on Main.dc.html). Linked from ui/layout.HEAD. */

/* ---- kit/upload.py: the drop zone ---- */

.aucra-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: auto;
  min-width: 0;
  max-width: none;
  max-height: none;
  margin: 14px 18px;
  padding: 22px 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--mist);
  text-align: center;
}
/* The softer look: the zone is an inner box (10px), its Choose a file a
   control (8px). */
.aucra-soft .aucra-drop {
  border-radius: var(--soft-radius-inner);
}
.aucra-drop.q-uploader--dnd {
  outline: none;
  border-color: var(--gold);
  background: var(--gold-wash);
}
.aucra-drop-icon {
  color: var(--muted);
  font-size: 22px;
}
.aucra-drop-line {
  font-size: 0.84rem;
}
.aucra-drop-note {
  font-size: 0.78rem;
  color: var(--muted);
}
/* Quasar's uploader is the dashed zone, so every point in the frame accepts a
   drop. Its own header chrome and file list stay out of the page. */
.aucra-drop .q-uploader__header {
  background: transparent;
  color: var(--text);
  padding: 0;
  min-height: 0;
}
.aucra-drop .q-uploader__list {
  display: none;
}
/* The header slot holds the artboard contents. The add trigger inside its
   button is the invisible file input Quasar hangs there. */
.aucra-upload-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  justify-content: center;
}
.aucra-upload-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: var(--weight-bold);
  cursor: pointer;
}
.aucra-soft .aucra-upload-pick {
  border-radius: 8px;
}
.aucra-upload-pick:hover {
  border-color: var(--line-strong);
}
.aucra-upload-pick:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ---- pages/documents_rows.py: the library register ---- */

.aucra-doc-name {
  font-family: var(--font-text);
  font-variant-numeric: tabular-nums;
  font-size: 0.81rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.aucra-doc-kind {
  min-width: 0;
  width: 100%;
}
.aucra-doc-state-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
/* The Remove of a row that could not be read is the warn colour, as the
   artboard draws it. */
.aucra-documents .aucra-register-row:has(.aucra-doc-failed) .aucra-register-remove,
.aucra-documents .aucra-register-row:has(.aucra-doc-failed) .aucra-register-remove .q-icon {
  color: var(--warn);
}
/* Line two sits under the name alone, where the artboard puts it, not across
   every column the way a clause register's does. */
.aucra-documents .aucra-register-under-cell {
  grid-column: 3 / 4;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
/* At the narrow widths of the build plan the name keeps its measure and the
   state column gives way: the head must never overprint the next caption and
   the page must never scroll sideways. */
@media (max-width: 1240px) {
  .aucra-documents .aucra-register-head,
  .aucra-documents .aucra-register-line,
  .aucra-documents .aucra-register-under {
    --aucra-cols-narrow: 20px 44px minmax(200px, 1fr) 132px 44px 132px 28px;
  }
}
@media (max-width: 900px) {
  .aucra-documents .aucra-register-head,
  .aucra-documents .aucra-register-line,
  .aucra-documents .aucra-register-under {
    --aucra-cols-narrow: 20px 40px minmax(200px, 1fr) 116px 40px 104px 28px;
  }
  .aucra-documents .aucra-register-head {
    font-size: 12px;
  }
}
/* The card's own width decides too: at 1024 with the rail docked the rows
   above cut off Remove, so a narrow card takes tracks that fit it, and a
   card narrower still (the assistant open beside it) scrolls the register
   inside its own box, as the kit does below 640px of viewport, so the
   scroll cue above it tells the truth. */
.aucra-documents {
  container: aucra-documents / inline-size;
}
@container aucra-documents (max-width: 699px) {
  .aucra-documents .aucra-register-head,
  .aucra-documents .aucra-register-line,
  .aucra-documents .aucra-register-under {
    --aucra-cols-narrow: 20px 40px minmax(180px, 1fr) 116px 40px 104px 28px;
  }
  .aucra-documents .aucra-register-head {
    font-size: 12px;
  }
  .aucra-documents .aucra-register {
    overflow-x: auto;
  }
}
.aucra-doc-pages {
  font-size: 0.78rem;
  color: var(--muted);
}
.aucra-doc-state {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 0;
}
.aucra-doc-ready {
  flex-direction: row;
  align-items: center;
  gap: 7px;
  color: var(--pass);
}
.aucra-doc-failed {
  display: block;
  color: var(--warn);
  line-height: 1.4;
}
.aucra-doc-running {
  color: var(--gold-deep);
}
.aucra-doc-under {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  font-size: 0.78rem;
  color: var(--muted);
}
.aucra-doc-link {
  color: var(--gold-deep);
  text-decoration: none;
}
.aucra-doc-link:hover {
  text-decoration: underline;
}
/* The counts under the register (services/documents/library.py), Index all
   again at their right end, and the line a reader of another embedding model
   reads under them (Reindex.dc.html). */
.aucra-register-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--wash-band);
  font-size: 0.81rem;
  color: var(--muted);
  line-height: 1.5;
  width: 100%;
}
.aucra-register-foot-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.aucra-register-foot-line {
  flex: 1;
}
.aucra-register-foot-under {
  color: var(--text);
}

/* The empty state of the library is a note, not a second drop zone: a solid
   line on white, as DocumentsEmpty.dc.html draws it. */
.aucra-documents .aucra-register-blank {
  margin: 0 18px 16px;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.aucra-soft .aucra-documents .aucra-register-blank {
  border-radius: var(--soft-radius-inner);
}

/* ---- kit/status.py: the thin gold line of a row still being read ---- */

.aucra-gold-line {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--gold-wash);
  overflow: hidden;
}
.aucra-gold-line-fill {
  display: block;
  height: 3px;
  background: var(--gold);
}

/* ---- kit/library_pick.py: the pick under an input row's box ---- */

.aucra-library-pick.q-btn {
  align-self: flex-start;
  margin-top: 4px;
  padding: 0 8px;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
}
/* Quasar paints the label on an inner span, which is what won over the
   button's own colour. */
.aucra-library-pick.q-btn .q-btn__content,
.aucra-library-pick.q-btn .q-icon {
  color: var(--muted);
}
.aucra-library-pick .q-icon {
  font-size: 14px;
}
/* Quasar's own focus helper was all a keyboard reader got here, a grey fill
   at about 1.6:1, so the button takes the 2px gold ring every kit q-btn takes
   (the 7.3 persona round, DM2). */
.q-btn.aucra-library-pick:focus-visible {
  box-shadow: 0 0 0 2px var(--focus-ring);
}
.aucra-library-pick .q-focus-helper {
  display: none;
}
/* What an empty library answers, under the button that was pressed (#80). */
.aucra-library-none {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}
.aucra-library-none:not(:empty) {
  margin-top: 4px;
}
.aucra-library-from {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}
.aucra-library-mark {
  font-size: 14px;
}

/* ---- pages/home.py: the document count on a workspace row ---- */

.aucra-row-documents {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- kit/upload.py again_button: a row's Upload again ----
   Quasar's uploader reduced to its one pick button, beside Index now. */
.aucra-upload-again {
  width: auto;
  min-width: 0;
  max-width: none;
  max-height: none;
  background: transparent;
  box-shadow: none;
}
.aucra-upload-again .q-uploader__header {
  background: transparent;
  color: var(--text);
  padding: 0;
  min-height: 0;
}
.aucra-upload-again .q-uploader__list {
  display: none;
}
.aucra-upload-again-head {
  display: flex;
}
