/* Door one — the spreadsheet door and its mapping step.
   A file of its own rather than lines in app.css: app.css is shared, this is not,
   and a new file cannot collide with anyone's edit to that one. Every colour comes
   from app.css's tokens, so both themes follow without a second palette. */

.ec .sheetpanel {
  max-width: 760px;
  margin: var(--s4) 0 0;
  padding: var(--s5);
  background: var(--panel);
  border: 1px solid var(--rule-2);
  border-left: 3px solid var(--accent);
}
.ec .sheeth {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--accent);
  margin: var(--s5) 0 var(--s2);
  font-weight: 600;
}
.ec .sheetpanel .sheeth:first-child { margin-top: 0; }
.ec .sheetnote {
  font-size: var(--t-small);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 var(--s3);
}

/* the mapping table */
.ec .sheetmap { width: 100%; border-collapse: collapse; margin: 0 0 var(--s3); }
.ec .sheetmap td { padding: var(--s3) 0; border-top: 1px solid var(--rule-2); vertical-align: top; }
.ec .sheetmap td.fname { padding-right: var(--s4); width: 46%; }
.ec .sheetmap .fnote {
  font-size: var(--t-data);
  line-height: 1.45;
  color: var(--slate);
  margin-top: 3px;
  max-width: 40ch;
}
.ec .sheetmap .tag {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-left: var(--s2);
  padding: 1px 5px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.ec .sheetmap .tag.sent { color: var(--accent); }
.ec .sheetmap .tag.kept { color: var(--slate); }
.ec .sheetmap tr.kept td.fname b { color: var(--ink-2); font-weight: 500; }
.ec .sheetmap tr.sep td {
  font-size: var(--t-data);
  line-height: 1.5;
  color: var(--slate);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule);
}
.ec .sheetmap select {
  width: 100%;
  font: inherit;
  font-size: var(--t-small);
  padding: 6px 8px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
}

/* how each mapped column will be read — three real values, so a date column pointed
   at an invoice number is obvious before anything is parsed against it */
.ec .sheetsample { width: 100%; border-collapse: collapse; margin: 0 0 var(--s3); }
.ec .sheetsample td { padding: var(--s3) 0; border-top: 1px solid var(--rule-2); vertical-align: top; }
.ec .sheetsample td.fname { width: 34%; padding-right: var(--s4); font-size: var(--t-small); }
.ec .sheetsample td.vals {
  font-family: var(--mono);
  font-size: var(--t-data);
  line-height: 1.6;
  color: var(--ink-2);
  word-break: break-word;
}
.ec .sheetsample .unread { color: var(--accent); text-decoration: line-through 1px; }
.ec .sheetsample tr.bad td.fname b, .ec .sheetsample tr.bad td.fname { color: var(--accent); }

.ec details.sheetdrop { margin: 0 0 var(--s3); font-size: var(--t-small); color: var(--ink-2); }
.ec details.sheetdrop summary { cursor: pointer; color: var(--accent); }
.ec details.sheetdrop > .sheetmap { margin-top: var(--s3); }
.ec details.sheetdrop ul {
  margin: var(--s2) 0 0;
  padding-left: var(--s5);
  font-family: var(--mono);
  font-size: var(--t-data);
  line-height: 1.7;
  color: var(--slate);
  max-height: 220px;
  overflow: auto;
}

@media (max-width: 640px) {
  .ec .sheetpanel { padding: var(--s4); }
  .ec .sheetmap td.fname { width: auto; }
  .ec .sheetmap tr { display: block; }
  .ec .sheetmap td { display: block; border-top: 0; padding: 4px 0; }
  .ec .sheetmap tr.sent td.fname, .ec .sheetmap tr.kept td.fname { border-top: 1px solid var(--rule-2); padding-top: var(--s3); }
}
