/**
 * VW Spec Importer — default frontend styles.
 *
 * Targets the exact class names templates/render-spec-single.php and
 * templates/render-spec-compare.php already output. Deliberately low
 * specificity (single classes, no element selectors on the page shell,
 * no !important except the two Standard/Optional cell backgrounds that
 * need to win over row striping) so a theme's own CSS can override
 * anything here just by loading after it or being a little more
 * specific.
 *
 * To turn this stylesheet off entirely and style the same class names
 * from your own theme instead:
 *   add_filter( 'vwsi_enqueue_frontend_css', '__return_false' );
 */

.spec-list-wrap,
.spec-compare-wrap {
	--vwsi-ink: #1a1f2b;
	--vwsi-muted: #6b7280;
	--vwsi-border: #e5e7eb;
	--vwsi-section-bg: #f3f4f6;
	--vwsi-standard: #1a7f4b;
	--vwsi-standard-bg: #eaf7ef;
	--vwsi-optional: #a15c00;
	--vwsi-optional-bg: #fdf3e3;
	--vwsi-stripe: #fafafa;
	--vwsi-accent: #1e2a5e;
	color: var(--vwsi-ink);
	font-size: 15px;
}

/* ---------------------------------------------------------------
 * Single derivative view: vertical list, no horizontal scroll —
 * this is the default page a customer lands on for one derivative.
 * --------------------------------------------------------------- */

.spec-list-wrap {
	max-width: 720px;
}

.spec-list__section {
	font-size: 13px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--vwsi-accent);
	background: var(--vwsi-section-bg);
	padding: 8px 12px;
	margin: 20px 0 0;
	border-radius: 6px 6px 0 0;
}

.spec-list__section:first-child {
	margin-top: 0;
}

dl.spec-list {
	margin: 0 0 4px;
	border: 1px solid var(--vwsi-border);
	border-top: none;
	border-radius: 0 0 6px 6px;
	overflow: hidden;
}

.spec-list__row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 16px;
	padding: 8px 12px;
	border-top: 1px solid var(--vwsi-border);
}

.spec-list__row:first-child {
	border-top: none;
}

.spec-list__row:nth-child(even) {
	background: var(--vwsi-stripe);
}

.spec-list__row dt {
	font-weight: 500;
	color: var(--vwsi-muted);
	flex: 1 1 55%;
	min-width: 0;
}

.spec-list__row dd {
	margin: 0;
	font-weight: 600;
	text-align: right;
	flex: 0 1 auto;
}

.spec-list__compare-link {
	margin-top: 16px;
}

.spec-list__compare-link a {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 6px;
	background: var(--vwsi-accent);
	color: #fff;
	text-decoration: none;
	font-weight: 600;
}

.spec-list__compare-link a:hover,
.spec-list__compare-link a:focus {
	opacity: .9;
}

/* ---------------------------------------------------------------
 * Compare-all-trims view: wide table with its own horizontal
 * scroll container, deliberately never the default single-page view.
 * --------------------------------------------------------------- */

.spec-compare-wrap {
	overflow-x: auto;
	border: 1px solid var(--vwsi-border);
	border-radius: 10px;
}

table.spec-compare-table {
	border-collapse: collapse;
	width: 100%;
	min-width: 720px;
	font-size: 13.5px;
}

table.spec-compare-table thead th {
	position: sticky;
	top: 0;
	background: var(--vwsi-accent);
	color: #fff;
	padding: 12px 14px;
	text-align: left;
	font-weight: 600;
	z-index: 2;
}

table.spec-compare-table thead th a {
	color: #fff;
	text-decoration: underline;
}

tr.section-row th {
	background: var(--vwsi-section-bg);
	text-align: left;
	padding: 9px 14px;
	font-size: 12px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--vwsi-accent);
	border-top: 1px solid var(--vwsi-border);
	border-bottom: 1px solid var(--vwsi-border);
}

th.spec-label {
	text-align: left;
	padding: 8px 14px;
	font-weight: 500;
	background: #fff;
	position: sticky;
	left: 0;
	border-right: 1px solid var(--vwsi-border);
	max-width: 320px;
}

table.spec-compare-table tbody tr:nth-child(even) td,
table.spec-compare-table tbody tr:nth-child(even) th.spec-label {
	background: var(--vwsi-stripe);
}

table.spec-compare-table td {
	padding: 8px 14px;
	border-bottom: 1px solid var(--vwsi-border);
	white-space: nowrap;
}

td.v-standard {
	color: var(--vwsi-standard);
	font-weight: 600;
	background: var(--vwsi-standard-bg) !important;
}

td.v-optional {
	color: var(--vwsi-optional);
	font-weight: 600;
	background: var(--vwsi-optional-bg) !important;
}

td.v-unavailable {
	color: #b3b7bf;
}
