/* The list of paints with links to buy them: Paint Names (paintNames.ts) and the print dialog
   (printInterstitial.ts). */

.brand-filters-room {
  container: brand-filters / inline-size;
}

.brand-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
  font-size: 0.85em;
}

/* All on one line, or two even lines: a short last line reads as a leftover. The rows sit closer than a
   tap is tall, so each row's tap area grows away from the other row, and the margin keeps the
   lower one clear of the paints. */
@container brand-filters (max-width: 392px) {
  .brand-filters-room .brand-filters {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    margin-bottom: 18px;
  }

  .brand-filter--upper { --tap-y: -16px; --tap-bottom: -7px; }
  .brand-filter--lower { --tap-y: -7px; --tap-bottom: -16px; }
}

.paint-checklist {
  list-style: none;
  padding: 0;
  margin: 0.5em 0;
  clear: both;
}

.paint-checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-1);
  font-size: 0.95em;
}

.paint-checklist li:last-child {
  border-bottom: none;
}

.paint-label {
  flex: 1;
  min-width: 0;
}

/* Buy's tap area fills the paint's row, short of the rows around it. A touch screen gives the row
   the height of a tap (and its border). */
.paint-buy-link {
  --tap-y: -6px;
  --tap-x: -4px;
  padding: 2px 8px;
  font-size: 0.75em;
  font-weight: 600;
  color: var(--surface);
  background-color: #f0960e;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (pointer: coarse) {
  .paint-checklist li {
    box-sizing: border-box;
    min-height: calc(var(--tap-size) + 1px);
  }

  .paint-buy-link {
    --tap-y: var(--tap-to-size);
  }
}

@media (hover: hover) {
  .paint-buy-link:hover {
    background-color: #d4820a;
  }
}

.paint-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid var(--shadow);
  vertical-align: middle;
  flex-shrink: 0;
}

.paint-approx-inline {
  color: var(--ink-2);
  font-size: 0.85em;
  white-space: nowrap;
}

.affiliate-disclosure {
  margin-top: 0.75em;
  font-size: 0.7em;
  color: var(--ink-3);
  text-align: center;
}

.paint-report-link {
  font-size: 0.75em;
  color: var(--ink-2);
  text-align: center;
  margin-top: 4px;
}

.paint-report-link a {
  --tap-y: var(--tap-to-size);
  color: var(--ui-accent);
  text-decoration: none;
}

@media (hover: hover) {
  .paint-report-link a:hover {
    text-decoration: underline;
  }
}

.paint-checklist-legend {
  margin-top: 0.5em;
  font-size: 0.75em;
  color: var(--ink-2);
  text-align: center;
}
