/* Planning tools: comparing supplier quotes (.qt-), and the seating helper (.sh-).
 *
 * Tokens only, nothing under 12px, tap targets of 44px on a phone. The printables have their own
 * file (css/printables.css) because most of it is paper.
 */

/* ----------------------------------------------------------- quotes ---- */

.qt-group { margin-bottom: var(--space-32); }

/* A laptop sees columns, a phone sees cards one under another: the same grid, wide enough for 230px
   cards, so it falls to one column on its own. Each card spans seven rows of the grid and takes them
   as a subgrid, so Price lines up with Price and Deposit with Deposit across the columns. Where
   subgrid is not supported the rows simply stack inside each card, which reads the same. */
.qt-grid {
  display: grid; gap: 0 var(--space-16); align-items: stretch;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.qt-card {
  display: grid; grid-row: span 7; grid-template-rows: subgrid;
  margin-bottom: var(--space-16); padding: 0 var(--space-16) var(--space-16);
  border: 1.5px solid var(--border); border-radius: var(--radius-card); background: var(--card);
}
@supports not (grid-template-rows: subgrid) {
  .qt-card { grid-row: auto; grid-template-rows: none; }
}
.qt-card.is-chosen { border-color: var(--good); }

.qt-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-8); padding: var(--space-16) 0 var(--space-8); align-content: flex-start; }
.qt-name { margin: 0; font-size: 16px; font-weight: 800; flex: 1 1 100%; overflow-wrap: anywhere; }
.qt-badges { display: flex; flex-wrap: wrap; gap: var(--space-8); }

.qt-row { padding: var(--space-8) 0; border-top: 1px solid var(--border); min-width: 0; }
.qt-label { display: flex; align-items: center; gap: var(--space-8); margin-bottom: var(--space-4); font-size: 12px; font-weight: 700; color: var(--muted); }
.qt-differs {
  padding: 0 var(--space-8); border-radius: var(--radius-pill); font-size: 12px; font-weight: 700;
  background: var(--warning-soft); color: var(--warning);
}
.qt-value { font-size: 14px; overflow-wrap: anywhere; }
.qt-price { font-size: 20px; font-weight: 800; font-family: var(--font-display); }
.qt-none { color: var(--muted); }
.qt-sub { margin-top: var(--space-4); font-size: 12.5px; color: var(--muted); }

.qt-items { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-4); font-size: 14px; }
.qt-items li { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-4) var(--space-8); }
.qt-only { font-weight: 700; }
.qt-only-tag {
  padding: 0 var(--space-8); border-radius: var(--radius-pill); font-size: 12px; font-weight: 700;
  background: var(--info-soft); color: var(--info);
}

.qt-foot { padding-top: var(--space-8); border-top: 1px solid var(--border); align-self: end; min-width: 0; }
.qt-notes { margin: 0 0 var(--space-8); font-size: 13px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.qt-actions { display: flex; flex-wrap: wrap; gap: var(--space-8); }

@media (max-width: 640px) {
  /* One card per row on a phone: the rows are not shared between cards, so no subgrid. */
  .qt-grid { grid-template-columns: minmax(0, 1fr); }
  .qt-card { grid-row: auto; grid-template-rows: none; }
  .qt-actions .btn { flex: 1 1 140px; justify-content: center; min-height: 44px; }
}

/* ---------------------------------------------------- seating helper ---- */

.sh { display: grid; gap: var(--space-4); }
.sh-section { padding: var(--space-16) 0 var(--space-8); border-bottom: 1px solid var(--border); }
.sh-section:last-of-type { border-bottom: 0; }
.sh h3 { margin: 0 0 var(--space-8); font-size: 16px; font-weight: 800; }
.sh h4 { margin: var(--space-16) 0 var(--space-8); font-size: 13px; font-weight: 800; color: var(--muted); }
.sh-hint { margin: 0 0 var(--space-8); font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.sh-seg { margin: var(--space-4) 0 var(--space-8); }
.sh-actions { display: flex; flex-wrap: wrap; gap: var(--space-8); padding: var(--space-8) 0 var(--space-8); }

.sh-list { margin: 0 0 var(--space-8); padding: 0; list-style: none; }
.sh-rule { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-8); min-height: 44px; padding: var(--space-8) 0; border-bottom: 1px solid var(--border); }
.sh-rule:last-child { border-bottom: 0; }
.sh-rule-text { flex: 1 1 200px; min-width: 0; font-size: 14.5px; overflow-wrap: anywhere; }

.sh-pick { display: grid; gap: var(--space-8); justify-items: start; margin: var(--space-8) 0; }
.sh-chips { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.sh-chip { display: inline-flex; align-items: center; gap: var(--space-4); min-height: 32px; padding-right: var(--space-4); }
.sh-chip-x {
  position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer;
}
/* A 28px button with a 44px hit area. */
.sh-chip-x::after { content: ""; position: absolute; inset: -8px; }
.sh-chip-x .material-symbols-rounded { font-size: 16px; }

.sh-fixed {
  padding: 0 var(--space-8); border-radius: var(--radius-pill); font-size: 12px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent-dark); flex: none;
}

/* The preview of a suggested plan. */
.sh-preview { display: grid; gap: var(--space-4); }
.sh-summary { margin: 0 0 var(--space-8); font-size: 15px; font-weight: 700; line-height: 1.5; }
.sh-moves, .sh-unplaced, .sh-notes { padding: var(--space-4) 0 var(--space-8); border-top: 1px solid var(--border); }
.sh-moves ul, .sh-unplaced ul, .sh-notes ul { margin: 0; padding: 0; list-style: none; }
.sh-moves li, .sh-unplaced li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4) var(--space-16); padding: var(--space-4) 0; font-size: 14px; }
.sh-notes li { padding: var(--space-4) 0; font-size: 13.5px; line-height: 1.5; }
.sh-who { font-weight: 700; }
.sh-from { color: var(--muted); }

@media (max-width: 640px) {
  .sh-actions .btn, .sh-pick .btn { min-height: 44px; }
  .sh-seg { display: flex; }
  .sh-seg button { flex: 1; min-height: 44px; }
}
