/*
 * De planselectie (#837).
 *
 * Alles onder `#plans`, want `.card` en `.plan` dragen in deze app nergens anders een regel: de
 * kaartvorm die de rest gebruikt is `.data-card`, en die staat boven 1023px met opzet op
 * `display: none` -- het is de mobiele weergave van een tabel. Dit is geen tabel maar een
 * prijskeuze, dus hij heeft zijn eigen vorm nodig in plaats van die te lenen.
 */

#plans {
  display: grid;
  gap: 0.75rem;
  /* Niet breder dan te lezen is: drie prijzen naast elkaar over een hele monitor laten het oog
     het bedrag en de termijn niet meer bij elkaar houden. */
  max-width: 34rem;
}

#plans .plan {
  background: var(--color-gray-7);
  border: 1px solid var(--color-border);
  border-radius: var(--roundness-2);
  padding: 0.85rem 1rem;
  display: grid;
  gap: 0.35rem;
}

#plans .plan h2 {
  margin: 0;
  font-size: 1.05rem;
}

#plans .plan__price {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

#plans .plan dl {
  /* Label en bedrag op één regel, de bedragen onder elkaar uitgelijnd: de btw hoort naast het
     netto te staan en niet eronder, anders leest de kaart als vier losse zinnen. */
  display: grid;
  grid-template-columns: max-content max-content;
  justify-content: start;
  column-gap: 0.75rem;
  row-gap: 0.1rem;
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

#plans .plan dt,
#plans .plan dd {
  margin: 0;
  /* FeatherCSS legt een `dl` boven 23.5rem in kolommen met `float` en `dt { width: 25% }`. In een
     grid doet die float niets meer, maar die 25% wel: het label kreeg een kwart van de kaart en
     brak "Excluding VAT" over twee regels naast een bedrag op één. */
  width: auto;
  float: none;
}

#plans .plan dd {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#plans .plan button.take {
  justify-self: start;
  margin-top: 0.25rem;
}

#plans .plan__level {
  /* The tie to the column above, not a second heading: it is there to be recognised, not read. */
  margin: -0.35rem 0 0.35rem;
  font-size: 0.85rem;
  color: var(--color-gray-3);
}

#plans .plan__incl {
  /* In the same paragraph as the amount but not at the same size: it is a unit beside a number
     of 1.35rem, not a second announcement. */
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-gray-3);
  white-space: nowrap;
}

/*
 * The comparison (#953).
 *
 * FeatherCSS gives every `td` and `th` 1rem all round. That is generous for a table of two columns
 * and unusable for one of four: at 390px there was nothing left for the row's own words. All of
 * this is bringing that back to what three narrow tick columns beside a long sentence need.
 */
#plans .plan-comparison {
  margin: 0;
}

#plans .plan-comparison caption {
  text-align: start;
  font-weight: 600;
  padding: 0 0 0.4rem;
}

#plans .plan-comparison th,
#plans .plan-comparison td {
  padding: 0.4rem 0.2rem;
  font-size: 0.85rem;
  line-height: 1.3;
}

#plans .plan-comparison th:first-child,
#plans .plan-comparison td:first-child {
  padding-inline-start: 0;
}

#plans .plan-comparison thead th:not(:first-child) {
  /* Exactly wide enough for the longest level name ("Persoonlijk") and no wider: the sentence
     beside it is what there is to read. */
  width: 5.2rem;
  text-align: center;
}

#plans .plan-comparison tbody th {
  /* A row heading here is not a heading to stand out but the question the columns answer; bold
     would make the whole first column louder than the table it belongs to. */
  font-weight: 400;
}

#plans .plan-comparison tbody td {
  text-align: center;
}

#plans .plan-comparison .icon-checkmark {
  color: var(--color-success);
}

#plans .plan-comparison .icon-cross {
  /* Visible, but not as a warning: this level not having this is not an error. */
  color: var(--color-gray-3);
  opacity: 0.6;
}

/*
 * The authorization to collect (#432).
 *
 * A question inside a price card, which is why it is quieter than everything above it: the box
 * and its words are a choice to make, and the line under them is what that choice means. At the
 * size of the price they would read as a second offer.
 */
#plans .plan__autopay {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.25rem;
  font-size: 0.95rem;
}

#plans .plan__autopay input {
  /* FeatherCSS's own margin around a checkbox predates flex `gap`, and the two add up. Its width
     stays: the box a viewer sees is `span::before` at the label's top-left, sized to match it. */
  margin: 0;
}

#plans .plan__autopay-explain {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-gray-3);
}
