/* Listing activity, and the showings additions that came with it.
   The showings rules are here rather than in styles.css because that file
   belongs to nobody in a parallel build. They are namespaced sh- to sit beside
   the rules already there. */

/* ---- Showings: the unmatched bucket and manual entry ---- */

/* Mirrors .off-unmatched on the Offers board, deliberately: the two pages are
   showing the same idea and should look like it. */
.sh-unmatched {
  display: flex; align-items: center; gap: 14px; padding: 4px 2px 4px 0;
  margin-bottom: 12px; cursor: pointer; border-left: 3px solid var(--amber);
}
.sh-unmatched:hover { border-color: var(--blue); }
.sh-card.sh-nolisting { border-left: 3px solid var(--amber); }
.sh-listing {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-top: 10px; padding: 8px 11px; background: #fffbeb; border-radius: 7px;
}
.sh-listing select {
  padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; font: inherit; font-size: 13px;
  /* min-width:0 or a long deal name stretches the row past the card */
  min-width: 0; max-width: 100%;
}

/* ---- Listing activity ---- */

.la-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.la-pick select { min-width: 0; max-width: 100%; }

.la-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.la-head-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* The number the whole page exists to produce. */
.la-total {
  flex: none; text-align: right; padding: 10px 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 11px;
}
.la-total b { display: block; font-size: 26px; line-height: 1.1; }
.la-total span { font-size: 12px; color: var(--muted); }

.la-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 980px) { .la-grid { grid-template-columns: 1fr; } }

.la-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.la-table th, .la-table td {
  padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top;
  /* a long label otherwise pushes the numbers out of the card */
  min-width: 0; overflow-wrap: anywhere;
}
.la-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); }
.la-table td.num, .la-table th.num { text-align: right; white-space: nowrap; }
.la-table tr.la-sum td { border-top: 2px solid var(--border); border-bottom: none; font-weight: 700; }
.la-table .sub { font-size: 11.5px; color: var(--muted); }

/* Counted and typed-in never merge, so they never share a column colour. */
.la-counted { font-weight: 700; }
.la-added { color: var(--muted); }

.la-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.la-inputs label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.la-inputs label span {
  font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .3px;
  overflow-wrap: anywhere;
}
.la-inputs input {
  padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; font: inherit; font-size: 13px; width: 100%;
}
.la-inputs .la-hint { font-size: 11.5px; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 400; }

.la-caveats { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); line-height: 1.65; }
.la-caveats li { margin-bottom: 4px; }

.la-folders { display: flex; gap: 6px; flex-wrap: wrap; }
.la-folder {
  display: inline-flex; gap: 5px; align-items: center; padding: 2px 8px; font-size: 12px;
  background: #f1f5f9; border-radius: 999px;
}

.la-history { font-size: 12.5px; }
.la-history tr td { padding: 5px 10px; }
