/* 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;
}
.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: 500;
  cursor: pointer;
}
.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: "IBM Plex Mono", monospace;
  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: 9.5px;
  }
}
.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, one line (services/documents/library.py). */
.aucra-register-foot {
  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%;
}

/* 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);
}

/* ---- 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: 500;
}
/* 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;
}
.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;
  /* The drawing has no cell for the count, so it is the cell that gives way
     first: the name keeps its 300px track until the count has gone. */
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
