/* QM Set Cards 0.5.0 / 1.1.0: "Compare the starting Sets". Loaded only where the block renders.
 * Reuses the body.qmsc tokens from cards.css; no new colours except the pending stripe.
 * Every rule is scoped under body.qmsc and the .qmsc-compare root. */

/* ---------- shared ---------- */
body.qmsc .qmsc-compare {
	clear: both; /* sit below the floated result count and sort dropdown */
	box-sizing: border-box;
	max-width: 100%;
	margin: 0 0 32px;
	color: var(--qmsc-ink);
	font-size: 15px;
	line-height: 1.5;
}

body.qmsc .qmsc-compare * {
	box-sizing: border-box;
}

body.qmsc .qmsc-compare__title {
	margin: 0 0 4px;
	padding: 0;
	color: var(--qmsc-navy);
	font-size: 22px;
	line-height: 1.25;
	letter-spacing: -.01em;
}

body.qmsc .qmsc-compare__intro {
	margin: 0 0 16px;
	padding: 0;
	color: var(--qmsc-muted);
}

body.qmsc .qmsc-pending {
	display: inline-block;
	padding: 2px 8px;
	border: 1px dashed #b9c3ca;
	border-radius: 6px;
	background: repeating-linear-gradient(135deg, #f6f8f9 0 6px, #eef1f3 6px 12px);
	color: var(--qmsc-muted);
	font-size: 12px;
	font-style: italic;
	line-height: 1.4;
}

body.qmsc .qmsc-compare .button {
	display: inline-block;
	padding: 10px 16px !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: var(--qmsc-blue) !important;
	color: #fff !important;
	font-size: 15px !important;
	line-height: 1.2 !important;
	text-align: center;
	text-decoration: none !important;
}

body.qmsc .qmsc-compare .button::after {
	display: none !important; /* Divi arrow */
}

/* ---------- archive comparison ---------- */
body.qmsc .qmsc-compare__scroller {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x mandatory;
	padding-bottom: 4px;
}

body.qmsc .qmsc-compare__grid {
	display: grid;
	grid-template-columns: repeat(var(--qmsc-cols, 4), minmax(0, 1fr));
	gap: 14px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

body.qmsc .qmsc-compare__col {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0 !important;
	padding: 18px 16px 16px !important;
	border: 1px solid var(--qmsc-line);
	border-radius: var(--qmsc-radius);
	background: var(--qmsc-surface);
	box-shadow: var(--qmsc-shadow);
	list-style: none !important;
	scroll-snap-align: start;
}

body.qmsc .qmsc-compare__col--best {
	border-color: var(--qmsc-green);
	box-shadow: 0 0 0 1px var(--qmsc-green), var(--qmsc-shadow);
}

body.qmsc .qmsc-compare__flags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	min-height: 22px;
	margin-bottom: 8px;
}

body.qmsc .qmsc-compare__badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--qmsc-navy);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	line-height: 1.4;
	text-transform: uppercase;
}

body.qmsc .qmsc-compare__badge--best {
	background: var(--qmsc-green);
}

body.qmsc .qmsc-compare__name {
	margin: 0 0 4px;
	padding: 0;
	font-size: 17px;
	line-height: 1.3;
}

body.qmsc .qmsc-compare__name a {
	color: var(--qmsc-navy);
	text-decoration: none;
}

body.qmsc .qmsc-compare__sub {
	margin: 0 0 10px;
	padding: 0;
	color: var(--qmsc-muted);
	font-size: 13.5px;
}

body.qmsc .qmsc-compare__pricebox {
	margin-top: auto;
}

body.qmsc .qmsc-compare__was {
	position: relative; /* 1.0.0: keeps the hidden screen-reader label inside its column, so off-screen columns never widen the page */
	margin: 0;
	padding: 0;
	color: var(--qmsc-muted);
	font-size: 15px;
	line-height: 1.3;
}

body.qmsc .qmsc-compare__was del {
	text-decoration-thickness: 1px;
}

body.qmsc .qmsc-compare__save {
	display: inline-block;
	margin: 2px 0 8px;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--qmsc-green);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
}

body.qmsc .qmsc-compare .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

body.qmsc .qmsc-compare__price {
	margin: 0 0 2px;
	padding: 0;
	color: var(--qmsc-ink);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
}

body.qmsc .qmsc-compare__step {
	min-height: 2.6em;
	margin: 0 0 10px;
	padding: 0;
	color: var(--qmsc-muted);
	font-size: 13.5px;
}

body.qmsc .qmsc-compare__step strong {
	color: var(--qmsc-ink);
}

body.qmsc .qmsc-compare__facts {
	margin: 0 0 12px;
	padding: 10px 0 0;
	border-top: 1px solid var(--qmsc-line-soft);
	font-size: 13.5px;
}

body.qmsc .qmsc-compare__facts dt {
	margin: 0;
	color: var(--qmsc-muted);
	font-weight: 400;
}

body.qmsc .qmsc-compare__facts dd {
	margin: 0 0 8px;
	color: var(--qmsc-ink);
	font-weight: 600;
}

body.qmsc .qmsc-compare__details {
	margin: 0 0 14px;
	font-size: 13.5px;
}

body.qmsc .qmsc-compare__details summary {
	cursor: pointer;
	color: var(--qmsc-blue);
	font-weight: 600;
}

body.qmsc .qmsc-compare__list-heading {
	margin: 8px 0 2px;
	padding: 0;
	color: var(--qmsc-muted);
	font-size: 11.5px;
	letter-spacing: .06em;
	text-transform: uppercase;
}

body.qmsc .qmsc-compare__details ul {
	margin: 0 !important;
	padding: 0 0 0 16px !important;
}

body.qmsc .qmsc-compare__details li {
	margin: 0;
	padding: 1px 0;
	overflow-wrap: anywhere;
}

body.qmsc .qmsc-compare__cta {
	width: 100%;
	margin-top: auto;
}

/* 1.1.0 desktop: exactly 3 full columns in view; the 4th and later sit off to the right and are
 * reached with the arrows (or a sideways scroll). minmax(): with 3 Sets or fewer the columns
 * fill the row; with 4+ they hold one third of the row each (3 columns + 2 gaps = 100%). */
@media (min-width: 981px) {
	body.qmsc .qmsc-compare__grid {
		grid-template-columns: repeat(var(--qmsc-cols, 4), minmax(calc((100% - 2 * 14px) / 3), 1fr));
	}

	body.qmsc .qmsc-compare__scroller {
		padding-bottom: 12px; /* room for the desktop scrollbar */
	}
}

@media (max-width: 980px) {
	body.qmsc .qmsc-compare__grid {
		grid-template-columns: repeat(var(--qmsc-cols, 4), minmax(250px, 1fr));
	}
}

@media (max-width: 767px) {
	body.qmsc .qmsc-compare__grid {
		grid-template-columns: repeat(var(--qmsc-cols, 4), 78vw);
	}
}

/* 1.1.0: previous / next arrows (4 Sets or more). Shown by assets/cards.js only when there is
 * something to scroll; the button at each end is disabled. Same arrows at every width. */
body.qmsc .qmsc-compare__nav {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin: 0 0 10px;
}

body.qmsc .qmsc-compare__nav[hidden] {
	display: none;
}

body.qmsc .qmsc-compare button.qmsc-compare__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	margin: 0 !important;
	padding: 0 0 3px !important;
	border: 1px solid var(--qmsc-line) !important;
	border-radius: 999px !important;
	background: var(--qmsc-surface) !important;
	box-shadow: var(--qmsc-shadow);
	color: var(--qmsc-navy) !important;
	font-size: 28px !important;
	line-height: 1 !important;
	cursor: pointer;
}

body.qmsc .qmsc-compare button.qmsc-compare__arrow::after {
	display: none !important; /* Divi button arrow */
}

body.qmsc .qmsc-compare button.qmsc-compare__arrow:hover:not(:disabled) {
	border-color: var(--qmsc-blue) !important;
}

body.qmsc .qmsc-compare button.qmsc-compare__arrow:focus-visible {
	outline: 2px solid var(--qmsc-blue);
	outline-offset: 2px;
}

body.qmsc .qmsc-compare button.qmsc-compare__arrow:disabled {
	opacity: .35;
	box-shadow: none;
	cursor: default;
}
