/**
 * Sections in the builder: the accordion, the stepped wizard and the per-section
 * counters.
 *
 * Monochrome and token-driven so it inherits the store's look rather than
 * imposing one, the same approach the catalogue toolbar and the box-only notice
 * take.
 */

.mixmatch-sections {
	--mm-sec-border: rgba(0, 0, 0, 0.12);
	--mm-sec-muted: rgba(0, 0, 0, 0.55);
	--mm-sec-bg: rgba(0, 0, 0, 0.02);
	--mm-sec-active-bg: rgba(0, 0, 0, 0.85);
	--mm-sec-active-text: #fff;
	--mm-sec-radius: 4px;
}

.mixmatch-section {
	margin: 0 0 20px;
	border: 1px solid var(--mm-sec-border);
	border-radius: var(--mm-sec-radius);
	overflow: hidden;
}

.mixmatch-section-header {
	margin: 0;
	background: var(--mm-sec-bg);
	border-bottom: 1px solid var(--mm-sec-border);
}

.mixmatch-section-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 12px 16px;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.mixmatch-section-name {
	font-weight: 600;
	font-size: 1.05em;
}

.mixmatch-section-header > .mixmatch-section-name {
	display: block;
	padding: 12px 16px;
}

.mixmatch-section-counter {
	flex: 0 0 auto;
	padding: 2px 10px;
	border: 1px solid var(--mm-sec-border);
	border-radius: 999px;
	background: #fff;
	font-size: 0.85em;
	white-space: nowrap;
}

.mixmatch-section.is-complete .mixmatch-section-counter {
	background: var(--mm-sec-active-bg);
	border-color: var(--mm-sec-active-bg);
	color: var(--mm-sec-active-text);
}

.mixmatch-section-body {
	padding: 16px;
}

.mixmatch-section.is-collapsed .mixmatch-section-body {
	display: none;
}

.mixmatch-section-description {
	margin: 0 0 10px;
	color: var(--mm-sec-muted);
}

.mixmatch-section-description p:last-child {
	margin-bottom: 0;
}

.mixmatch-section-hint {
	margin: 0 0 12px;
	color: var(--mm-sec-muted);
	font-size: 0.9em;
}

.mixmatch-section:not(.is-complete) .mixmatch-section-hint {
	font-weight: 600;
	color: inherit;
}

/* A full section still shows its tiles; they simply stop accepting clicks. */
.mixmatch-section .add_cta.mixmatch-section-blocked {
	opacity: 0.4;
	pointer-events: none;
	cursor: not-allowed;
}

/* ---------------------------------------------------------------------
 * Stepped wizard
 * ------------------------------------------------------------------ */

.mixmatch-sections--stepped .mixmatch-section {
	display: none;
}

.mixmatch-sections--stepped .mixmatch-section.is-current {
	display: block;
}

.mixmatch-sections--stepped .mixmatch-section-toggle {
	cursor: default;
}

.mixmatch-sections-progress {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 4px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.mixmatch-sections-step {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1 1 auto;
	padding: 8px 12px;
	border: 1px solid var(--mm-sec-border);
	border-radius: var(--mm-sec-radius);
	color: var(--mm-sec-muted);
	font-size: 0.9em;
	cursor: pointer;
}

.mixmatch-sections-step.is-current {
	border-color: var(--mm-sec-active-bg);
	color: inherit;
	font-weight: 600;
}

.mixmatch-sections-step.is-done {
	color: inherit;
}

.mixmatch-sections-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: 1px solid currentColor;
	border-radius: 50%;
	font-size: 0.8em;
	line-height: 1;
}

.mixmatch-sections-step.is-current .mixmatch-sections-step-number,
.mixmatch-sections-step.is-done .mixmatch-sections-step-number {
	background: var(--mm-sec-active-bg);
	border-color: var(--mm-sec-active-bg);
	color: var(--mm-sec-active-text);
}

.mixmatch-sections-nav {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 18px;
}

.mixmatch-sections-nav button[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

.mixmatch-section-review-group {
	margin: 0 0 14px;
}

.mixmatch-section-review-group h4 {
	margin: 0 0 6px;
	font-size: 1em;
}

.mixmatch-section-review-group ul {
	margin: 0;
	padding-left: 18px;
}

.mixmatch-sections-hidden {
	display: none !important;
}

.mixmatch-sections-surcharge {
	margin: 0 0 12px;
	font-weight: 600;
}

@media (max-width: 600px) {
	.mixmatch-sections-step-name {
		display: none;
	}

	.mixmatch-sections-step {
		flex: 0 0 auto;
		justify-content: center;
	}
}
