/* One option-card style for every choice group on the idea form: idea type, brands,
   vehicle system, benchmark, vehicle family, market, saving and timing.
   Title 17px/700, subline 14px, one selected look (orange outline, tint and a check badge). */
.brand-options,
.scope-options {
  display: grid;
  gap: 10px;
}

.brand-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.scope-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.cats > button,
.brand-options > button,
.scope-options > button {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 76px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 14px 12px;
  border: 1px solid #d3d9e0;
  border-radius: 12px;
  color: var(--ink);
  background: #fbfcfd;
  box-shadow: none;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: break-word;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

/* Vehicle system cards carry only a title: centre it. */
.cats.system-group > button { min-height: 60px; justify-content: center; }

.cats > button:hover,
.brand-options > button:hover,
.scope-options > button:hover { border-color: var(--orange); }

.cats > button:focus-visible,
.brand-options > button:focus-visible,
.scope-options > button:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Title */
.cats > button > b,
.brand-options > button > span,
.scope-options > button > b {
  display: block;
  width: 100%;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.25;
}

/* Amounts and month ranges ("€1–<€5", "1–3 months"): figures of equal width, like every other number. */
.cats.saving-group > button > b,
.cats.timing-group > button > b { font-variant-numeric: tabular-nums; }

/* Subline */
.cats > button > small,
.brand-options > button > b,
.scope-options > button > span {
  display: block;
  width: 100%;
  margin: 0;
  color: #4f5b6b;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
}

/* Brand and vehicle/market sublines arrive in capitals ("OUT OF SCOPE", "100,000 VEHICLES / YEAR"):
   show them in sentence case like the other sublines. */
.brand-options > button > b,
.scope-options > button > span { text-transform: lowercase; }

.brand-options > button > b::first-letter,
.scope-options > button > span::first-letter { text-transform: uppercase; }

/* When a market line has to wrap, wrap it as "100,000" / "vehicles / year", never leaving "year" alone. */
.market-options > button > span { text-wrap: balance; }
@media (min-width: 721px) { .market-options > button > span { white-space: nowrap; } }

/* Selected */
.cats > button.selected,
.brand-options > button.selected,
.brand-options > button[aria-pressed="true"],
.scope-options > button.selected,
.scope-options > button[aria-pressed="true"] {
  border-color: var(--orange);
  color: var(--ink);
  background: #fff0e9;
  box-shadow: inset 0 0 0 1px var(--orange);
}

.cats > button.selected > small,
.brand-options > button.selected > b,
.brand-options > button[aria-pressed="true"] > b,
.scope-options > button.selected > span,
.scope-options > button[aria-pressed="true"] > span { color: #b9461a; }

.cats > button.selected::after,
.brand-options > button.selected::after,
.brand-options > button[aria-pressed="true"]::after,
.scope-options > button.selected::after,
.scope-options > button[aria-pressed="true"]::after {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
  background: #c4471c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
  content: "";
}

.selection-status {
  display: flex;
  min-height: 32px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 10px 0 0;
  padding: 6px 12px;
  border-radius: 999px;
  color: #4f5b6b;
  background: #f0f2f4;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.35;
}

.selection-status.has-selection { color: #286f56; background: #e4f2ec; }

/* Vehicle family and market sit side by side: share their rows so the two status chips line up. */
@media (min-width: 851px) {
  .scope-columns { grid-template-rows: repeat(4, auto); row-gap: 0; }
  .scope-columns > div { display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; }
}

/* Next to the side panel (1181–1299px) the form column is too narrow for four cards in a row: stack family over market. */
@media (min-width: 1181px) and (max-width: 1299px) {
  .scope-columns { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 20px; }
  .scope-columns > div { display: block; grid-row: auto; }
}

@media (max-width: 850px) {
  .scope-columns { grid-template-columns: minmax(0, 1fr); }
  .cats.system-group > button { padding: 10px 6px; font-size: 16px; letter-spacing: 0; }
}

@media (max-width: 650px) {
  .brand-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cats.system-group > button { padding: 14px 12px; font-size: 17px; }
}
