/* Nabd — the comparison page (ADR-0062). Loaded by its section only. */

/* The comparison page: a column per product, the specs lined up in rows. */
.compare-page__differences {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-small);
  font-weight: 500;
  cursor: pointer;
}

.compare-page__intro {
  max-width: 42rem;
  margin-block-end: 2rem;
  color: var(--fg-muted);
}

.compare-table__scroll {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  min-width: calc(10rem + var(--compare-count, 2) * 13rem);
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--text-small);
}

.compare-table th,
.compare-table td {
  padding: 0.875rem 1rem 0.875rem 0;
  border-block-end: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}

[dir='rtl'] .compare-table th,
[dir='rtl'] .compare-table td {
  padding: 0.875rem 0 0.875rem 1rem;
}

.compare-table tbody th {
  width: 10rem;
  color: var(--fg-muted);
  font-weight: 400;
}

.compare-table thead td,
.compare-table thead th {
  border-block-end: 0;
  vertical-align: bottom;
}

.compare-table__product {
  position: relative;
  display: grid;
  gap: 0.75rem;
  max-width: 12rem;
}

.compare-table__product a {
  display: grid;
  gap: 0.75rem;
  font-size: var(--text-body);
  font-weight: 500;
  text-decoration: none;
}

.compare-table__product img {
  width: 100%;
  max-width: 12rem;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: var(--media);
  object-fit: cover;
}

.compare-table__remove {
  position: absolute;
  inset-block-start: 0.375rem;
  inset-inline-end: 0.375rem;
  background: var(--bg);
  box-shadow: var(--shadow-card);
}

.compare-table__price .price__current {
  font-size: 1.125rem;
}

.is-differences [data-same] {
  display: none;
}

.compare-table .compare-table__group th {
  padding-block: 1.75rem 0.5rem;
  color: var(--fg);
  font-size: var(--text-body);
  font-weight: 600;
}

.is-differences .compare-table__group {
  display: none;
}
