/* Module stylesheet: documents. Owned by the documents feature module; base styles live in public/style.css. */

/* Requirement rows */
table.requirements td {
  min-width: 0;
}
table.requirements tr.dormant td {
  background: var(--surface-muted);
}
.formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  align-items: center;
}
.format-state {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-muted);
  white-space: nowrap;
}
.format-state.received {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
}
.format-state.rejected {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: transparent;
}
.format-state.missing {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: transparent;
}
.formats-fieldset {
  margin-bottom: 0;
}

/* Row action menus: the panel is repositioned by app.js; keep its contents readable when it is long. */
.menu-panel .menu-note {
  display: block;
  padding: 0.45rem 0.6rem;
  max-width: 260px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.menu-panel form {
  display: block;
}
.menu-panel .danger-text {
  color: var(--danger);
}

/* Files */
.filename {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}
.unmatched li .row {
  margin-bottom: 0.35rem;
}
.match-form select {
  width: auto;
  max-width: 100%;
  flex: 1 1 220px;
}
.upload-details > summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.upload-form {
  max-width: 720px;
}
.upload-form .progress {
  margin-top: 0.25rem;
}
.card.narrow {
  max-width: 720px;
}

/* Dialogs hold full forms; keep them scrollable on short screens without clipping the menus behind them. */
dialog .requirement-form {
  max-height: 70vh;
  overflow: auto;
  padding-right: 0.25rem;
}

/* Request composer */
.composer .request-item {
  align-items: flex-start;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
}
.composer .request-item:last-child {
  border-bottom: none;
}
.composer .request-item input {
  margin-top: 0.3rem;
}
.email-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  max-height: 60vh;
  overflow: auto;
}
