/*
 * Side-by-side price comparison table: one plant size without and with a battery.
 * Rules instead of cards; the battery column is tinted.
 */

.gyla-compare {
  background: #ffffff;
}

.gyla-compare__header {
  max-width: 720px;
  margin-bottom: 44px;
}

.gyla-compare__header h2 {
  margin: 0 0 24px;
  color: var(--gyla-color-ink);
  font-size: var(--gyla-text-h2);
  line-height: 1.15;
}

.gyla-compare__header p {
  margin: 0;
  color: var(--gyla-color-text);
  font-size: var(--gyla-text-lead);
  line-height: 1.7;
}

.gyla-compare__table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.gyla-compare__table th,
.gyla-compare__table td {
  padding: 20px 24px;
  color: var(--gyla-color-ink);
  font-size: var(--gyla-text-body);
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  vertical-align: middle;
  border: 0;
  border-bottom: 1px solid var(--gyla-color-border);
}

.gyla-compare__table th[scope="row"] {
  width: 28%;
  color: var(--gyla-color-text-muted);
  font-size: var(--gyla-text-small);
  font-weight: 500;
}

.gyla-compare__table thead th {
  padding-top: 0;
  padding-bottom: 18px;
  font-size: var(--gyla-text-title);
  font-weight: 700;
  border-bottom: 3px solid var(--gyla-color-ink);
}

.gyla-compare__table thead td {
  border-bottom: 3px solid var(--gyla-color-ink);
}

.gyla-compare__table .gyla-compare__battery {
  background: var(--gyla-color-surface-mist);
}

.gyla-compare__table thead .gyla-compare__battery {
  padding-top: 18px;
}

.gyla-compare__badge {
  display: block;
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 10px;
  color: var(--gyla-color-ink);
  font-size: var(--gyla-text-caption);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--gyla-color-lime);
}

.gyla-compare__empty {
  color: var(--gyla-color-text-muted);
}

.gyla-compare__table .gyla-compare__price {
  font-size: var(--gyla-text-title-lg);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.gyla-compare__price small {
  display: block;
  color: var(--gyla-color-text-muted);
  font-size: var(--gyla-text-caption);
  font-weight: 600;
}

.gyla-compare__table tfoot td {
  padding-top: 24px;
  padding-bottom: 24px;
  border-bottom: 0;
}

.gyla-compare__button {
  width: 100%;
}

p.gyla-compare__note {
  max-width: 720px;
  margin: 32px 0 0;
  color: var(--gyla-color-text);
  font-size: var(--gyla-text-body);
  line-height: 1.7;
}

.gyla-compare__note a {
  color: var(--gyla-color-teal-strong);
  font-weight: 700;
}

@media (max-width: 767px) {
  .gyla-compare__table th,
  .gyla-compare__table td {
    padding: 16px 10px;
    font-size: var(--gyla-text-small);
  }

  .gyla-compare__table th[scope="row"] {
    width: 30%;
    font-size: var(--gyla-text-caption);
  }

  .gyla-compare__table thead th {
    font-size: var(--gyla-text-body);
  }

  .gyla-compare__table .gyla-compare__price {
    font-size: var(--gyla-text-title);
  }

  .gyla-compare__button {
    padding-right: 10px;
    padding-left: 10px;
  }
}

/* Variant: three options (e.g. 7 kW without a battery, with 10 kWh, with 16 kWh) */

.gyla-compare__table--three th[scope="row"] {
  width: 22%;
}

@media (max-width: 767px) {
  .gyla-compare__table--three th[scope="row"] {
    width: 25%;
  }

  .gyla-compare__table--three .gyla-compare__price {
    font-size: var(--gyla-text-body);
  }
}

/*
 * Phones: three columns don't fit, so each row becomes a grid: the row label on
 * its own line, the two values side by side under it.
 */
@media (max-width: 600px) {
  .gyla-compare__table,
  .gyla-compare__table thead,
  .gyla-compare__table tbody,
  .gyla-compare__table tfoot {
    display: block;
  }

  .gyla-compare__table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .gyla-compare__table thead td,
  .gyla-compare__table tfoot td:first-child {
    display: none;
  }

  .gyla-compare__table th[scope="row"] {
    grid-column: 1 / -1;
    width: auto;
    padding: 14px 10px 0;
    border-bottom: 0;
  }

  .gyla-compare__table thead th {
    border-bottom-width: 3px;
  }

  .gyla-compare__table td {
    padding-top: 6px;
  }

  .gyla-compare__table tfoot td {
    padding-top: 20px;
  }

  .gyla-compare__badge {
    letter-spacing: 0.02em;
  }

  .gyla-compare__table--three tr {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gyla-compare__table--three th,
  .gyla-compare__table--three td {
    padding-right: 6px;
    padding-left: 6px;
  }

  .gyla-compare__table--three .gyla-compare__button {
    padding-right: 6px;
    padding-left: 6px;
    font-size: var(--gyla-text-small);
  }
}
