/**
 * ModulHaus Konfigurator — pełnoekranowe doświadczenie formularza.
 * Paleta i typografia są spójne z motywem marki; selektory strony usuwają
 * ograniczenia standardowego szablonu wyłącznie tam, gdzie działa shortcode.
 */

.page-id-7022 .page_content_wrap {
	padding-top: 0;
	padding-bottom: 0;
}

.page-id-7022 .page_content_wrap > .content_wrap,
.page-id-7022 .page_content_wrap .content,
.page-id-7022 .post_item_single,
.page-id-7022 .post_content {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.mh-konfigurator {
	--mhk-bg: #fafafa;
	--mhk-paper: #ffffff;
	--mhk-warm: #f5f0e8;
	--mhk-border: #e5ded2;
	--mhk-navy: #0f1923;
	--mhk-navy-soft: #172532;
	--mhk-text: #626b72;
	--mhk-meta: #92989a;
	--mhk-gold: #c8a96e;
	--mhk-gold-dark: #a88750;
	--mhk-error: #9f3833;

	position: relative;
	width: 100%;
	min-height: calc(100svh - 76px);
	overflow: hidden;
	font-family: "DM Sans", sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: var(--mhk-text);
	background:
		radial-gradient(circle at 8% 18%, rgba(200, 169, 110, 0.12), transparent 26rem),
		radial-gradient(circle at 92% 86%, rgba(15, 25, 35, 0.055), transparent 30rem),
		linear-gradient(135deg, #fafafa 0%, #f8f6f1 100%);
}

.mh-konfigurator::before,
.mh-konfigurator::after {
	content: "";
	position: absolute;
	pointer-events: none;
	border: 1px solid rgba(200, 169, 110, 0.22);
	transform: rotate(45deg);
}

.mh-konfigurator::before {
	width: 360px;
	height: 360px;
	right: -245px;
	top: -235px;
}

.mh-konfigurator::after {
	width: 220px;
	height: 220px;
	left: -165px;
	bottom: -145px;
}

.mhk-shell {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-rows: auto 1fr auto;
	width: min(1180px, calc(100% - 64px));
	min-height: calc(100svh - 76px);
	margin: 0 auto;
	box-sizing: border-box;
	padding: 38px 0 28px;
}

/* Postęp */

.mhk-progress {
	width: 100%;
	animation: mhk-reveal 0.55s cubic-bezier(.2,.8,.2,1) both;
}

.mhk-progress-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 12px;
}

.mhk-progress-brand,
.mhk-progress-label,
.mhk-kicker,
.mhk-card-number {
	font-family: "Hanken Grotesk", sans-serif;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.15em;
	text-transform: uppercase;
}

.mhk-progress-brand { color: var(--mhk-navy); }
.mhk-progress-label { color: var(--mhk-meta); }

.mhk-progress-track {
	height: 3px;
	overflow: hidden;
	background: rgba(15, 25, 35, 0.1);
}

.mhk-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, var(--mhk-gold-dark), #dfc58f);
	box-shadow: 0 0 18px rgba(200, 169, 110, 0.45);
	transition: width 0.65s cubic-bezier(.22,1,.36,1);
}

/* Główna scena */

.mhk-stage {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 36px 0;
}

.mhk-panel {
	position: relative;
	width: min(980px, 100%);
	box-sizing: border-box;
}

.mhk-step-frame {
	animation: mhk-step-in 0.58s cubic-bezier(.22,1,.36,1) both;
}

.mhk-step-watermark {
	position: absolute;
	z-index: -1;
	right: 0;
	top: -62px;
	font-family: "Hanken Grotesk", sans-serif;
	font-size: clamp(110px, 13vw, 180px);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.07em;
	color: rgba(15, 25, 35, 0.035);
	user-select: none;
}

.mhk-kicker {
	margin: 0 0 13px;
	color: var(--mhk-gold-dark);
}

.mhk-title {
	max-width: 820px;
	margin: 0;
	font-family: "Hanken Grotesk", sans-serif;
	font-size: clamp(32px, 4.1vw, 54px);
	font-weight: 600;
	line-height: 1.06;
	letter-spacing: -0.035em;
	color: var(--mhk-navy);
}

.mhk-title:focus { outline: 0; }

.mhk-subtitle {
	max-width: 680px;
	margin: 13px 0 0;
	font-size: 15px;
	color: var(--mhk-meta);
}

.mhk-error {
	display: none;
	margin: 20px 0 0;
	padding: 11px 14px;
	font-size: 14px;
	font-weight: 500;
	color: var(--mhk-error);
	background: #fff1ef;
	border-left: 3px solid var(--mhk-error);
}

.mhk-error.is-visible {
	display: block;
	animation: mhk-error-in 0.28s ease both;
}

/* Odpowiedzi */

.mhk-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin-top: 32px;
}

.mhk-card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 116px;
	width: 100%;
	box-sizing: border-box;
	padding: 18px 20px 20px;
	overflow: hidden;
	text-align: left;
	font: inherit;
	color: var(--mhk-navy);
	background: rgba(255, 255, 255, 0.74);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(15, 25, 35, 0.11);
	border-radius: 2px;
	cursor: pointer;
	box-shadow: 0 10px 35px rgba(15, 25, 35, 0.025);
	transition:
		transform 0.28s cubic-bezier(.2,.8,.2,1),
		border-color 0.25s ease,
		background-color 0.25s ease,
		box-shadow 0.25s ease,
		color 0.25s ease;
}

.mhk-card::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 3px;
	background: var(--mhk-gold);
	transition: width 0.32s cubic-bezier(.22,1,.36,1);
}

.mhk-card:hover {
	color: var(--mhk-navy);
	background: var(--mhk-paper);
	border-color: rgba(168, 135, 80, 0.62);
	box-shadow: 0 18px 46px rgba(15, 25, 35, 0.08);
	transform: translateY(-4px);
}

.mhk-card:hover::after,
.mhk-card.is-selected::after { width: 100%; }

.mhk-card.is-selected,
.mhk-card.is-selected:hover,
.mhk-card.is-selected:focus {
	color: #fafafa;
	background: var(--mhk-navy);
	border-color: var(--mhk-navy);
	box-shadow: 0 20px 50px rgba(15, 25, 35, 0.16);
}

.mhk-card-number { color: var(--mhk-meta); }
.mhk-card.is-selected .mhk-card-number { color: var(--mhk-gold); }

.mhk-card-label {
	max-width: calc(100% - 28px);
	font-family: "Hanken Grotesk", sans-serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.22;
	letter-spacing: -0.01em;
}

.mhk-card-check {
	position: absolute;
	right: 17px;
	bottom: 18px;
	display: grid;
	place-items: center;
	width: 25px;
	height: 25px;
	border: 1px solid rgba(15, 25, 35, 0.16);
	border-radius: 50%;
	font-size: 0;
	color: var(--mhk-navy);
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.mhk-card-check::before {
	content: "";
	width: 5px;
	height: 9px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(-1px, -1px) scale(0);
	transition: transform 0.24s cubic-bezier(.2,.9,.3,1.4);
}

.mhk-card.is-selected .mhk-card-check {
	background: var(--mhk-gold);
	border-color: var(--mhk-gold);
}

.mhk-card.is-selected .mhk-card-check::before {
	transform: rotate(45deg) translate(-1px, -1px) scale(1);
}

/* Pola */

.mhk-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 17px 20px;
	margin-top: 28px;
}

.mhk-field:last-of-type:nth-child(odd) { grid-column: 1 / -1; }

.mhk-label {
	display: block;
	margin: 0 0 7px;
	font-family: "Hanken Grotesk", sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--mhk-navy);
}

.mhk-input {
	width: 100%;
	height: 48px;
	box-sizing: border-box;
	padding: 11px 14px;
	font: inherit;
	font-size: 15px;
	color: var(--mhk-navy);
	background: rgba(255, 255, 255, 0.82);
	border: 1px solid rgba(15, 25, 35, 0.16);
	border-radius: 2px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.mhk-input:hover { border-color: rgba(168, 135, 80, 0.65); }

.mhk-input:focus {
	outline: none;
	background: #fff;
	border-color: var(--mhk-gold-dark);
	box-shadow: 0 0 0 4px rgba(200, 169, 110, 0.16);
}

textarea.mhk-input {
	height: 76px;
	min-height: 76px;
	resize: vertical;
}

.mhk-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Zgoda i nawigacja */

.mhk-consent {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	max-width: 820px;
	margin-top: 18px;
}

.mhk-consent-box {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--mhk-navy);
}

.mhk-consent-label {
	font-size: 12px;
	line-height: 1.5;
	color: var(--mhk-text);
}

.mhk-consent-label a {
	color: var(--mhk-navy);
	text-decoration-color: var(--mhk-gold);
	text-underline-offset: 3px;
}

.mhk-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-top: 30px;
}

.mhk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 50px;
	box-sizing: border-box;
	padding: 14px 24px;
	font-family: "Hanken Grotesk", sans-serif;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: 1px;
	cursor: pointer;
	transition: transform 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.mhk-btn span { font-size: 17px; font-weight: 400; line-height: 0; }

.mhk-btn-next {
	margin-left: auto;
	color: #fafafa;
	background: var(--mhk-navy);
	border-color: var(--mhk-navy);
}

.mhk-btn-next:hover:not(:disabled) {
	color: var(--mhk-navy);
	background: var(--mhk-gold);
	border-color: var(--mhk-gold);
	transform: translateX(3px);
}

.mhk-btn-next:disabled { opacity: 0.55; cursor: wait; }

.mhk-btn-back {
	color: var(--mhk-text);
	background: transparent;
	border-color: rgba(15, 25, 35, 0.15);
}

.mhk-btn-back:hover {
	color: var(--mhk-navy);
	border-color: var(--mhk-navy);
	transform: translateX(-3px);
}

.mhk-card:focus-visible,
.mhk-btn:focus-visible,
.mhk-consent-box:focus-visible {
	outline: 3px solid rgba(200, 169, 110, 0.6);
	outline-offset: 3px;
}

.mhk-footnote {
	margin: 8px 0 0;
	font-size: 11px;
	color: var(--mhk-meta);
	text-align: right;
}

.mhk-trust {
	display: flex;
	justify-content: center;
	gap: 28px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--mhk-meta);
}

.mhk-trust span::before {
	content: "✓";
	margin-right: 7px;
	color: var(--mhk-gold-dark);
}

/* Potwierdzenie */

.mhk-thanks { text-align: center; }

.mhk-thanks .mhk-title,
.mhk-thanks .mhk-subtitle { margin-left: auto; margin-right: auto; }

.mhk-thanks-icon {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	margin: 0 auto 24px;
	font-size: 30px;
	color: var(--mhk-navy);
	background: var(--mhk-gold);
	border-radius: 50%;
	box-shadow: 0 20px 50px rgba(168, 135, 80, 0.25);
}

.mhk-thanks-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 28px;
}

.mhk-thanks-actions .mhk-btn-next { margin-left: 0; }

/* Animacje */

.mhk-is-leaving .mhk-step-frame {
	opacity: 0;
	transform: translateX(-24px);
	transition: opacity 0.16s ease, transform 0.16s ease;
}

.mhk-is-leaving.mhk-going-back .mhk-step-frame { transform: translateX(24px); }

@keyframes mhk-reveal {
	from { opacity: 0; transform: translateY(-8px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes mhk-step-in {
	from { opacity: 0; transform: translateX(28px); filter: blur(3px); }
	to { opacity: 1; transform: translateX(0); filter: blur(0); }
}

@keyframes mhk-error-in {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Tablet */

@media (max-width: 900px) {
	.mhk-shell { width: min(100% - 40px, 760px); padding-top: 28px; }
	.mhk-stage { padding: 30px 0; }
	.mhk-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mhk-card { min-height: 104px; }
}

/* Telefon */

@media (max-width: 600px) {
	.page-id-7022 .page_content_wrap { overflow: visible; }

	.mh-konfigurator { min-height: calc(100svh - 72px); }
	.mh-konfigurator::before { width: 220px; height: 220px; right: -160px; top: -155px; }
	.mh-konfigurator::after { display: none; }

	.mhk-shell {
		width: calc(100% - 32px);
		min-height: calc(100svh - 72px);
		padding: 22px 0 20px;
	}

	.mhk-progress-meta { margin-bottom: 10px; }
	.mhk-progress-brand { font-size: 9px; }
	.mhk-progress-label { font-size: 10px; }
	.mhk-stage { align-items: flex-start; padding: 34px 0 26px; }
	.mhk-step-watermark { top: -38px; right: -4px; font-size: 90px; }
	.mhk-kicker { margin-bottom: 10px; font-size: 10px; }
	.mhk-title { font-size: clamp(29px, 9vw, 38px); }
	.mhk-subtitle { margin-top: 10px; font-size: 13px; }

	.mhk-cards {
		grid-template-columns: 1fr;
		gap: 9px;
		margin-top: 24px;
	}

	.mhk-card {
		min-height: 68px;
		padding: 13px 16px;
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		gap: 14px;
	}

	.mhk-card:hover { transform: none; }
	.mhk-card-number { flex: none; }
	.mhk-card-label { font-size: 16px; }
	.mhk-card-check { right: 14px; bottom: 50%; transform: translateY(50%); }

	.mhk-fields { grid-template-columns: 1fr; gap: 13px; margin-top: 22px; }
	.mhk-field:last-of-type:nth-child(odd) { grid-column: auto; }
	.mhk-input { height: 46px; }
	textarea.mhk-input { height: 68px; min-height: 68px; }
	.mhk-consent { margin-top: 15px; }
	.mhk-nav { margin-top: 24px; }
	.mhk-btn { min-height: 48px; padding: 13px 18px; }
	.mhk-trust { justify-content: space-between; gap: 8px; font-size: 9px; }
	.mhk-trust span::before { display: none; }
}

@media (max-width: 370px) {
	.mhk-nav { flex-direction: column-reverse; }
	.mhk-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.mh-konfigurator *,
	.mh-konfigurator *::before,
	.mh-konfigurator *::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
