/**
 * AITopUp — compare page styles.
 */

/* Compare table — horizontal scroll */
.compare-page-shell {
  padding: clamp(1rem, 3vw, 1.5rem);
  border-radius: var(--radius);
}

.compare-page-shell .section-header {
  margin-bottom: 1rem;
}

.compare-table-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1rem;
  padding: 0 1rem 0.5rem;
  scroll-snap-type: x proximity;
}

.compare-table-wrap::after {
  content: "";
  position: sticky;
  right: 0;
  top: 0;
  float: right;
  width: 2rem;
  height: 100%;
  margin-right: -1rem;
  background: linear-gradient(to left, var(--color-bg), transparent);
  pointer-events: none;
}

.compare-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.compare-table th,
.compare-table td {
  padding: 0.75rem;
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: top;
  background: var(--card);
}

.compare-table th:first-child,
.compare-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  text-align: left;
  font-weight: 600;
  color: var(--fg-bright);
  background: var(--bg-elevated);
  min-width: 7rem;
}

.compare-table thead th {
  background: var(--bg-elevated);
  color: var(--fg-bright);
}

.compare-remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  border: none;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.compare-table thead th { position: relative; min-width: 8.5rem; }

.compare-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 0;
}
.compare-name { font-weight: 600; color: var(--fg-bright); margin-bottom: 0.25rem; }
.compare-price { color: var(--accent-link); font-weight: 700; margin-bottom: 0.75rem; font-size: clamp(0.9375rem, 3vw, 1.0625rem); }

.compare-table .btn-sm {
  width: 100%;
  min-height: 2.5rem;
}

.compare-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
