/**
 * Safe-Mattress page — structural extras only (v6.0.0).
 *
 * As of v6.0.0 the global Clarity layer (clarity.css) owns ALL color,
 * typography, section rhythm, cards, grids, tables, callouts, <details>, the
 * Key Research box, dark mode, and responsive behavior — including a bridge
 * (Clarity §11) for this page's #safe-mattress-guide + .mcsx-* classes. The
 * old page-scoped "light-lock" that used to live here is GONE; it now only
 * fought Clarity. This file keeps just the few structural pieces Clarity does
 * not provide: the comparison chips, the two-question filter controls, the
 * dimmed-card state, small card text rhythm, and the sticky mobile helper.
 * Loaded after clarity.css so these win where they overlap.
 */

/* ── Two-question filter controls (Clarity styles the .mcsx-filter shell) ── */
.mcsx-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: center;
	gap: 16px;
	padding: 18px 20px;
	margin: 0 auto 10px;
	max-width: 820px;
}

.mcsx-filter-field { display: flex; flex-direction: column; gap: 4px; }

.mcsx-filter-field label {
	font-weight: 700;
	font-size: 0.95rem;
	color: var( --clarity-navy, #173b4f );
}

.mcsx-filter select {
	font-size: 1rem;
	padding: 10px 12px;
	border: 1px solid var( --clarity-line-strong, #bfd3ce );
	border-radius: 10px;
	background: #ffffff;
	color: var( --clarity-ink, #20312f );
	min-width: 190px;
}

.mcsx-filter button {
	background: none;
	border: none;
	color: var( --clarity-teal-dark, #205d57 );
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
	padding: 10px 4px;
}

.mcsx-filter select:focus-visible,
.mcsx-filter button:focus-visible {
	outline: 3px solid var( --clarity-navy, #173b4f );
	outline-offset: 2px;
}

.mcsx-match-count {
	text-align: center;
	font-size: 0.92rem;
	color: var( --clarity-muted, #566864 );
	margin: 4px 0 22px;
	min-height: 1.2em;
}

/* ── Comparison chips ─────────────────────────────────────────────── */
.mcsx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.mcsx-chip {
	font-size: 0.8rem;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 999px;
	border: 1px solid transparent;
}

.mcsx-chip--yes { background: #e7f6ec; color: #1f6b3b; border-color: #a7d9b8; }
.mcsx-chip--no  { background: #fdecec; color: #9b2c2c; border-color: #f2b8b8; }

/* ── Card text rhythm (color comes from Clarity) ──────────────────── */
.mcsx-card { display: flex; flex-direction: column; text-align: left; }
.mcsx-card .mcsx-price { font-size: 0.9rem; margin: 0 0 12px; }
.mcsx-feel { font-size: 0.9rem; margin: 0 0 10px; }
.mcsx-bestfor { margin: 0 0 14px; }
.mcsx-card .mcsx-link { margin-top: auto; font-weight: 700; text-decoration: none; }
.mcsx-card .mcsx-link:hover { text-decoration: underline; }

/* Dimmed state for the optional filter (Clarity handles .is-match). */
.mcsx-card.is-dim { opacity: 0.5; }
.mcsx-card.is-dim:hover,
.mcsx-card.is-dim:focus-within { opacity: 1; }

/* ── Sticky mobile helper ─────────────────────────────────────────── */
.mcsx-sticky-mobile { display: none; }

@media ( max-width: 640px ) {
	.mcsx-sticky-mobile {
		display: block;
		position: sticky;
		bottom: 12px;
		text-align: center;
		margin: 24px 0 0;
		z-index: 5;
	}
	.mcsx-sticky-mobile a {
		display: inline-block;
		background: var( --clarity-teal, #2f766f );
		color: #fff;
		font-weight: 700;
		padding: 12px 22px;
		border-radius: 999px;
		box-shadow: 0 8px 24px rgba( 22, 48, 45, 0.28 );
		text-decoration: none;
	}
}
