/* Node detail modal on the distribution page.
   Backdrop, panel, close button and animation live in theme.css. */

.modal-content h3 {
  margin: 0 0 1.1rem;
  padding-right: 2.5rem;      /* clear of the close button */
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-mono);
  word-break: break-all;
}

.modal-content p {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0;
  padding: 0.6rem 0;
  font-size: 0.9rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.modal-content p:last-of-type {
  border-bottom: none;
  margin-bottom: 0.5rem;
}

.modal-content p strong {
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .modal-content {
    padding: 1.35rem;
  }

  .modal-content p {
    flex-direction: column;
    gap: 0.15rem;
  }
}

/* --- job submission form --- */

.field-label {
  display: block;
  margin-top: 1.1rem;
  margin-bottom: 0.3rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.field-hint {
  display: block !important;
  margin: 0 0 0.5rem !important;
  padding: 0 !important;
  border: none !important;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.field-status:not(:empty) {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}

.field-status .success-message,
.field-status .error-message {
  display: block;
  padding: 0.5rem 0.7rem;
  font-size: 0.8125rem;
}

/* What each kind of file gives you. The choice of file is the choice of
   model, so the two are shown as one decision rather than a paragraph
   describing both and a dropdown further down repeating it. */

.data-kinds {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.data-kinds li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  background-color: var(--surface-2);
}

.data-kind-ext {
  padding: 0.15rem 0.4rem;
  border-radius: var(--r-xs);
  background-color: var(--surface-3);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}

.data-kinds li div {
  display: grid;
  gap: 0.15rem;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.data-kinds strong {
  color: var(--text);
  font-weight: 600;
}

.data-kinds span {
  color: var(--text-muted);
}

/* Says why the button below it is not available yet, so a disabled control
   is never a dead end. */
.send-hint:empty {
  display: none !important;
}

.send-hint {
  margin-top: 0.4rem !important;
  text-align: center;
}

/* Something true about the data that is worth knowing before the job runs,
   but is not an error -- the upload succeeded. Toned as counsel, not alarm. */
.field-advice:empty {
  display: none !important;
}

.field-advice {
  display: block !important;
  margin: 0.5rem 0 0 !important;
  padding: 0.55rem 0.7rem !important;
  border: 1px solid var(--warning) !important;
  border-left-width: 3px !important;
  border-radius: var(--r-xs);
  background-color: var(--warning-wash);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: left;
}

/* What the run will do to the uploaded data, updated as the numbers change.
   Stated as a fact, not a verdict: measurement did not support calling a high
   pass count a mistake. Only genuinely leaving data unread earns a tone. */
.job-run-shape:empty {
  display: none;
}

.job-run-shape {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.job-run-shape.is-thin {
  color: var(--warning);
}

/* Only worth saying once a dataset exists. */
.add-more[hidden] {
  display: none !important;
}

.add-more {
  margin: 0.45rem 0 0 !important;
  color: var(--accent) !important;
}

#taskDataInput {
  min-height: 190px;
}

#sendTaskButton {
  margin-top: 0.85rem;
  width: 100%;
}

#taskResponseMessage:not(:empty) {
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* Where the job went, shown after it is queued. */
.modal-followup {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
}

/* --- the job form --- */

.job-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.5rem;
}

.job-field {
  display: grid;
  gap: 0.3rem;
  /* Pack to the top. Fields are stretched to the tallest in their row, and
     without this the rows of a field that has no hint stretch to fill that
     height -- so "Learning rate", alone in having no hint, had its input
     pushed below the two beside it. */
  align-content: start;
}

.job-field-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.job-field-hint {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  display: block !important;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-faint);
}

/* Two across, so the panel does not become a long column of single inputs. */
.job-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.job-section-title {
  margin: 0.4rem 0 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* What the node fills in from the dataset, so nobody hunts for the input. */
.job-derived-note:not(:empty) {
  margin: 0;
  padding: 0.5rem 0.7rem;
  border-radius: var(--r-sm);
  background-color: var(--surface-2);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.job-advanced {
  border-top: 1px solid var(--border);
  padding-top: 0.7rem;
}

.job-advanced > summary {
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-faint);
  list-style: none;
}

.job-advanced > summary::-webkit-details-marker { display: none; }

.job-advanced > summary:hover { color: var(--text-muted); }

.job-advanced-body {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

/* --- what the contributor can see --- */

.data-privacy {
  margin-top: 0.6rem;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: var(--r-md);
  background-color: var(--warning-wash);
  overflow: hidden;
}

.data-privacy > summary {
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--warning);
  list-style: none;
}

.data-privacy > summary::-webkit-details-marker { display: none; }

.data-privacy-body {
  padding: 0 0.85rem 0.85rem;
}

.data-privacy-warning {
  margin: 0 0 0.6rem !important;
  padding: 0 !important;
  border: none !important;
  display: block !important;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text);
}

.data-privacy-body ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
}

.data-privacy-body li {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-muted);
}
