/* Import report. Ported from spectrasearch (src/components/Imports/imports.css);
   class names kept identical so the two stay diffable.
   Palette: #1a1d26 ink, #5b5b5b muted, #dde1e9 hairline, #f0f2f5 tint.
   The page frame (.im-page/.im-back in the original) is omitted -- layouts/ambit.njk
   already supplies the container width and padding here. */

#im-root {
  --st-ink: #1d2733;
  --st-mut: #6b7785;
  --st-line: #e1e6ec;
  --st-bg: #f6f8fa;
  --st-acc: #0b6bcb;
  --st-accbg: #e8f1fb;
  color: var(--st-ink);
  padding: 20px 0;
}
#im-root [hidden] {
  display: none !important;
}
#im-root button,
#im-root input,
#im-root select {
  font: inherit;
}
#im-root :focus-visible {
  outline: 2px solid var(--st-acc) !important;
  outline-offset: 2px;
}

/* One line above the report, not a paragraph: the page's headings and the Partner control
   say most of it, and every line here is a line the table does not get. */
.im-dek {
  margin: 0 0 10px;
  color: #646e7f;
  font-size: 13px;
}

.im-status,
.im-note,
.im-empty {
  color: #5b5b5b;
  margin: 12px 0;
}

.im-note {
  border-left: 3px solid #dde1e9;
  padding-left: 10px;
}

.im-error {
  color: #8a2f22;
  background: #fbeeec;
  border-left: 3px solid #8a2f22;
  padding: 9px 12px;
  margin: 12px 0;
  border-radius: 0 4px 4px 0;
}

/* --- jump list across sources ------------------------------------------ */
/* Shown only when the project aggregates more than one collection. */
.im-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.im-jumpitem {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 12px;
  border: 1px solid #dde1e9;
  border-radius: 6px;
  text-decoration: none;
  color: #1a1d26;
  font-size: 13px;
}
.im-jumpitem:hover {
  background: #f0f2f5;
}
.im-jumpitem span {
  color: #5b5b5b;
  font-size: 12px;
}

/* --- section ------------------------------------------------------------ */
.im-section {
  margin: 0 0 34px;
}

/* Breathing room around the report. Deliberately here rather than via the
   layout's container_type: ambit.njk feeds that same value into the page-title
   band, so the site's "sp" spacing class inflates the header to 90px top and
   bottom instead of spacing the content. */
.im-dek {
  margin-top: 24px;
}
.im-section:last-of-type {
  margin-bottom: 48px;
}

.im-sectionhead {
  border-bottom: 1px solid #dde1e9;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.im-h2 {
  margin: 0;
  font-size: 17px;
  color: #1a1d26;
}

.im-sub {
  margin: 3px 0 0;
  color: #5b5b5b;
  font-size: 13px;
}
.im-sub code {
  background: #f0f2f5;
  border-radius: 3px;
  padding: 0 4px;
}

/* --- findings ----------------------------------------------------------- */
.im-findings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.im-finding {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: #f0f2f5;
  color: #1a1d26;
}
.im-finding:hover {
  border-color: #9aa3b2;
}
.im-finding[aria-pressed="true"] {
  border-color: #1a1d26;
}
.im-finding .im-n {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.im-clear {
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid #dde1e9;
  background: none;
  color: #5b5b5b;
}

/* Severity, shared by the finding buttons and the row chips. */
.im-critical {
  background: #fbeeec;
  color: #8a2f22;
}
.im-warn {
  background: #fdf3e0;
  color: #7a5510;
}
.im-info {
  background: #eef2fb;
  color: #2f4a8c;
}
.im-ok {
  background: #eef5ef;
  color: #33603f;
}

/* --- table -------------------------------------------------------------- */
.im-tablewrap {
  overflow-x: auto;
  border: 1px solid #dde1e9;
  border-radius: 6px;
}

.im-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 720px;
  font-size: 13px;
}

.im-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5b5b5b;
  background: #f7f8fa;
  padding: 8px 12px;
  border-bottom: 1px solid #dde1e9;
  white-space: nowrap;
}

.im-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #eef0f4;
  vertical-align: top;
  color: #1a1d26;
}

.im-table tbody tr:last-child td {
  border-bottom: none;
}

.im-table tbody tr:hover td {
  background: #f7f8fa;
}

.im-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* .im-table th is more specific than .im-num, so a numeric column's header
   would otherwise sit left while its values sit right. */
.im-table th.im-num {
  text-align: right;
}

.im-key {
  min-width: 240px;
}

/* How a file is stored, as a qualifier inside the `imported` chip rather than a chip of its
   own: the input file of an AMBIT import (__input_file_s) or a NeXus file on the study
   document (nexus_file_ss). The file is the source of the data; this says which record
   declares it, so a partner can tell why their file is in one list and not the other. */
.im-record {
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 9px;
  opacity: .72;
}

.im-name {
  word-break: break-word;
}

/* The other names of one delivery -- the NeXus file a spreadsheet was folded into -- on the
   SAME line as the source name, quiet and cut with an ellipsis rather than given a line of
   its own. The full path is in the title. */
.im-alias {
  display: inline-block;
  max-width: 42ch;
  margin-left: 7px;
  font-size: 11px;
  color: #8a94a3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.im-alias::before {
  content: "\00b7";
  margin-right: 5px;
  color: #c3c9d2;
}

.im-missing {
  display: block;
  color: #8a2f22;
  font-style: italic;
}

.im-inv {
  display: block;
  margin-top: 2px;
  color: #5b5b5b;
  font-size: 12px;
  /* an investigation title can be an entire paragraph -- that is one of the
     defects this report exists to show, so clamp it rather than let one row
     push the table off the screen */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.im-inv-bad {
  color: #7a5510;
}

.im-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.im-chip {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 3px;
  white-space: nowrap;
}

.im-inspect {
  white-space: nowrap;
  text-decoration: none;
  font-size: 12px;
  padding: 3px 9px;
  border: 1px solid #dde1e9;
  border-radius: 4px;
  color: #2f4a8c;
}
.im-inspect:hover {
  background: #f0f2f5;
  border-color: #9aa3b2;
}

/* A link that opens one member of the row rather than the whole row. Dashed,
   because the difference matters: the reader is getting an example. */
.im-inspect-partial {
  border-style: dashed;
  color: #7a5510;
}

/* The chooser shown when a row covers several studies. Not in the original
   stylesheet -- the React build leant on the browser default, which under this
   site's Bootstrap reset renders as an unindented run-on list. */
.im-picker > summary {
  cursor: pointer;
  white-space: nowrap;
  font-size: 12px;
  color: #2f4a8c;
}
.im-picker ul {
  margin: 4px 0 0;
  padding-left: 16px;
  font-size: 12px;
}
.im-picker li {
  margin: 1px 0;
}
.im-more {
  list-style: none;
  color: #5b5b5b;
}

/* Provider band: the level the rows are grouped under. */
.im-grouprow td {
  background: #f0f2f5;
  font-weight: 600;
  font-size: 12px;
  color: #1a1d26;
  border-bottom: 1px solid #dde1e9;
  padding: 6px 12px;
}
.im-grouprow td span {
  float: right;
  font-weight: 400;
  color: #5b5b5b;
}
.im-grouprow td em {
  font-weight: 400;
  color: #5b5b5b;
}

.im-noview {
  color: #9aa3b2;
}

.im-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Partner list: the page's one control. */
.im-control {
  margin: 0 0 18px;
}
.im-control label {
  font-weight: 600;
  margin-right: 6px;
}
.im-control select {
  min-width: 260px;
  max-width: 100%;
}
.im-hint {
  color: #5b5b5b;
  font-size: 12px;
}

.im-partner-slot {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}
.im-partner-slot .im-control {
  margin: 0;
}
.im-partner-slot .im-control label {
  display: none;
}
.im-partner-slot .im-control select {
  width: 100%;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--st-line);
  border-radius: 6px;
  background: #fff;
}
.im-partner-slot .im-hint {
  display: none;
}
.im-search {
  margin: 0 0 14px;
}
.im-search .ps-status {
  margin: 0 0 0 auto;
  white-space: nowrap;
}
.im-results .im-section {
  margin: 0;
}
.im-detail .ps-detail-content > .ps-study:last-child {
  margin-bottom: 0;
}
.im-detail .ps-links a {
  color: var(--st-acc);
}
.im-nexus-summary {
  padding: 8px 10px;
  margin-bottom: 12px;
  border-radius: 6px;
  background: var(--st-bg);
}
.im-nexus-summary .ps-count {
  margin: 0 0 5px;
  font-weight: 600;
}
.im-investigation {
  margin-bottom: 16px;
}
.im-investigation > h3 {
  margin: 0 0 8px;
  color: var(--st-ink);
  font-size: 15px;
}
.im-facets .st-fac-count {
  margin-left: auto;
}
.im-tablewrap {
  overflow: visible;
}
.im-table {
  border: 0;
  border-collapse: separate;
  border-spacing: 0 8px;
  background: transparent;
}
.im-table thead {
  display: none;
}
.im-table tbody tr:not(.im-grouprow) {
  background: #fff;
  box-shadow: 0 1px 3px rgba(29, 39, 51, .08);
}
.im-table tbody tr:not(.im-grouprow) td {
  border-top: 1px solid #e1e6ec;
  border-bottom: 1px solid #e1e6ec;
  padding: 12px;
  vertical-align: top;
}
.im-table tbody tr:not(.im-grouprow) td:first-child {
  border-left: 1px solid #e1e6ec;
  border-radius: 6px 0 0 6px;
  width: 42%;
  overflow-wrap: anywhere;
}
.im-table tbody tr:not(.im-grouprow) td:last-child {
  border-right: 1px solid #e1e6ec;
  border-radius: 0 6px 6px 0;
  min-width: 230px;
}
.im-table .im-picker {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #e1e6ec;
  border-radius: 6px;
  background: #f6f8fa;
}
.im-table .im-picker summary {
  color: #0b6bcb;
  cursor: pointer;
  font-weight: 600;
}
.im-table .im-picker ul {
  margin: 8px 0 0;
  padding-left: 18px;
}
.im-table .im-picker li {
  margin: 6px 0;
}
.im-table .im-inspect {
  display: inline-block;
  margin: 8px 8px 0 0;
}
@media (max-width: 767px) {
  .im-partner-slot {
    flex-basis: 100%;
    margin: 6px 0 0;
  }
  .im-partner-slot .im-control select {
    min-width: 0;
  }
}

/* Collapsible provider band. */
.im-grouprow {
  cursor: pointer;
}
.im-caret {
  display: inline-block;
  width: 1em;
  color: #5b5b5b;
}
