/**
 * Amazon specification sections on the single product page.
 *
 * Deliberately restrained: inherits the theme's typography, colour and spacing
 * rather than imposing its own, so it reads as part of the site rather than as
 * a plugin bolted on. Only layout and rhythm are set here, and colours are
 * expressed as currentColor so they follow whatever the theme sets.
 */

.amzsync-specs {
	margin: 0 0 2rem;
}

.amzsync-spec-group + .amzsync-spec-group {
	margin-top: 2rem;
}

.amzsync-spec-heading {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.amzsync-spec-list {
	display: grid;
	grid-template-columns: minmax(9rem, 14rem) 1fr;
	gap: 0;
	margin: 0;
	padding: 0;
}

.amzsync-spec-label,
.amzsync-spec-value {
	margin: 0;
	padding: 0.7rem 0;
	border-top: 1px solid currentColor;
	border-color: color-mix(in srgb, currentColor 12%, transparent);
}

.amzsync-spec-list > .amzsync-spec-label:first-of-type,
.amzsync-spec-list > .amzsync-spec-label:first-of-type + .amzsync-spec-value {
	border-top: 0;
}

.amzsync-spec-label {
	padding-right: 1.25rem;
	font-weight: 600;
	opacity: 0.72;
}

.amzsync-spec-value {
	overflow-wrap: anywhere;
}

/* Multi-value fields — device compatibility above all — read as a list. */
.amzsync-spec-value--list ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.amzsync-spec-value--list li {
	margin: 0;
	padding: 0.2rem 0.6rem;
	border: 1px solid currentColor;
	border-color: color-mix(in srgb, currentColor 18%, transparent);
	border-radius: 999px;
	font-size: 0.875em;
	line-height: 1.5;
}

@media (max-width: 640px) {
	.amzsync-spec-list {
		grid-template-columns: 1fr;
	}

	.amzsync-spec-label {
		padding-bottom: 0;
		border-top-width: 1px;
	}

	.amzsync-spec-list > .amzsync-spec-label + .amzsync-spec-value {
		padding-top: 0.15rem;
		border-top: 0;
	}
}

/* "View on Amazon" link ---------------------------------------------- */

.amzsync-amazon-link {
	margin: 1rem 0 0;
}

.amzsync-amazon-link a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 1rem;
	border: 1px solid currentColor;
	border-color: color-mix(in srgb, currentColor 30%, transparent);
	border-radius: 4px;
	font-size: 0.9em;
	line-height: 1.4;
	text-decoration: none;
}

.amzsync-amazon-link a::after {
	content: "↗";
	font-size: 0.9em;
	opacity: 0.7;
}

.amzsync-amazon-link a:hover,
.amzsync-amazon-link a:focus {
	border-color: currentColor;
}
