/* =========================================================================
   Recorded lines, their receipts, and correcting them.

   The month's lines stopped being a table. A line now carries its evidence
   and its correction form with it, which a table row cannot do without
   turning into something you drag sideways on a phone.
   ========================================================================= */

.lines {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  margin-bottom: var(--s4);
  overflow: hidden;
}

.lineitem {
  padding: var(--s4);
  border-bottom: 1px solid var(--line);
}
.lineitem:last-of-type { border-bottom: 0; }

.linehead {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
}
.linemain {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.linemain b { font-weight: 650; }
.linemain .mono { font-size: 12.5px; color: var(--ink-3); }
.linemain .det {
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.45;
}
.lineamt {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  flex: none;
}

.linetotal {
  display: flex;
  justify-content: space-between;
  padding: var(--s3) var(--s4);
  background: var(--sunken);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------------- receipts */
.linercs {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  margin-top: var(--s3);
}
.rcchip {
  display: block;
  width: 54px; height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--sunken);
  flex: none;
}
.rcchip:hover { border-color: var(--brand); }
.rcchip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rcfile {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  font-size: 10px; letter-spacing: .06em; font-weight: 650;
  color: var(--ink-3);
}

/* A file input styled as a button, so attaching a receipt looks like an
   action rather than a form control nobody notices. */
.rcadd {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 8px 13px;
  border: 1px dashed var(--field-line);
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  cursor: pointer;
}
.rcadd:hover { border-color: var(--brand); color: var(--ink); }
.rcadd input[type=file] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.rcadd.busy { opacity: .6; pointer-events: none; }
.rcadd .i { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- editing */
.lineedit { margin-top: var(--s3); }
.lineedit > summary {
  display: inline-flex; align-items: center;
  min-height: 34px; padding: 6px 0;
  font-size: 13.5px; font-weight: 600;
  color: var(--brand);
  cursor: pointer; list-style: none;
}
.lineedit > summary::-webkit-details-marker { display: none; }
.lineedit > summary::before { content: "Correct this line"; }
.lineedit > summary { font-size: 0; }
.lineedit > summary::before { font-size: 13.5px; }
.lineedit[open] > summary::before { content: "Close"; }
.lineedit form {
  margin-top: var(--s2);
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--sunken);
}
.lineedit .field { margin-bottom: var(--s3); }

@media (max-width: 600px) {
  .lineitem { padding: var(--s3) var(--s4); }
  .lineamt { font-size: 15px; }
  .rcchip { width: 48px; height: 48px; }
}

/* ---------------------------------------------------------------- accounts */
/* Someone with two S-corps has two accounts, and until now could only ever
   reach the first one. */
.acctswitch {
  padding: var(--s2) var(--s3) 0;
}
.acctswitch select {
  width: 100%;
  font-size: 14px;
  padding: 8px 10px;
  min-height: 40px;
}
.acctswitch .lab {
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 650; margin-bottom: 4px; display: block;
}
