/**
 * HG Automotive — vehicle comparison page and table.
 *
 * The comparison table stays a real `<table>` at every breakpoint; on
 * narrow viewports it scrolls horizontally inside `.hg-auto-comparison__scroll`
 * instead of being restructured into a div-based layout, so screen reader
 * row/column relationships never break.
 *
 * @package HG_Automotive
 * @since 0.12.0
 */

.hg-auto-comparison__header {
	margin-bottom: var(--hg-auto-space-5);
}

/* Compare toggle active state (shared button base lives in buyer-favourites.css). */
.hg-auto-buyer-action--compare.is-active {
	background: var(--hg-auto-color-ink);
	border-color: var(--hg-auto-color-ink);
	color: #fff;
}

.hg-auto-buyer-action--compare.is-active:hover,
.hg-auto-buyer-action--compare.is-active:focus-visible {
	background: #000;
	border-color: #000;
	color: #fff;
}

.hg-auto-comparison__scroll {
	overflow-x: auto;
	max-width: 100%;
	min-width: 0;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	margin-bottom: var(--hg-auto-space-5);
	border: 1px solid var(--hg-auto-color-border);
	border-radius: var(--hg-auto-radius);
	background: var(--hg-auto-color-surface-elevated);
	box-shadow: var(--hg-auto-shadow);
}

.hg-auto-comparison__scroll:focus-visible {
	outline: none;
	box-shadow: var(--hg-auto-focus);
}

.hg-auto-comparison-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 40rem;
}

.hg-auto-comparison-table__caption {
	text-align: left;
	padding: var(--hg-auto-space-4) var(--hg-auto-space-4) 0;
	font-size: 0.875rem;
	color: var(--hg-auto-color-muted);
}

.hg-auto-comparison-table th,
.hg-auto-comparison-table td {
	padding: var(--hg-auto-space-3) var(--hg-auto-space-4);
	border-bottom: 1px solid var(--hg-auto-color-border);
	text-align: left;
	vertical-align: top;
}

.hg-auto-comparison-table thead th {
	background: var(--hg-auto-color-surface);
	border-bottom: 2px solid var(--hg-auto-color-border);
	vertical-align: bottom;
}

.hg-auto-comparison-table__field-label {
	white-space: nowrap;
	font-weight: 600;
	color: var(--hg-auto-color-steel);
	background: var(--hg-auto-color-surface);
}

.hg-auto-comparison-table__vehicle-head {
	min-width: 12rem;
}

.hg-auto-comparison-heading {
	display: flex;
	flex-direction: column;
	gap: var(--hg-auto-space-2);
}

.hg-auto-comparison-heading__title {
	font-family: var(--hg-auto-font-display);
	font-size: 1rem;
	line-height: 1.3;
}

.hg-auto-comparison-heading__title a {
	color: var(--hg-auto-color-ink);
	text-decoration: none;
}

.hg-auto-comparison-heading__title a:hover,
.hg-auto-comparison-heading__title a:focus-visible {
	color: var(--hg-auto-color-accent);
}

.hg-auto-comparison__image {
	width: 100%;
	max-width: 10rem;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--hg-auto-radius);
}

.hg-auto-comparison__dash {
	color: var(--hg-auto-color-muted);
}

.hg-auto-comparison__unavailable {
	color: var(--hg-auto-color-muted);
	font-style: italic;
}

.hg-auto-comparison__clear {
	display: inline-flex;
}
