/* =========================================================
   Konfigurator palet — CenterPAL
   Paleta kolorów i typografia zgodne ze style.css motywu
   ========================================================= */

/* Zmienne muszą być globalne — popup wyceny renderuje się poza .kf */
:root {
	--kf-green: #065941;
	--kf-green-dark: #04422f;
	--kf-green-soft: #eef4f1;
	--kf-ink: #37474f;
	--kf-muted: #7c8a91;
	--kf-line: #d9d9d9;
	--kf-line-soft: #ececec;
	--kf-bg: #f7f7f5;
}

.kf,
.kf-modal {
	font-family: "Montserrat", sans-serif;
	color: #37474f;
}

/* [hidden] musi wygrywać z display:flex/grid na .kf-row itp. */
.kf [hidden],
.kf-modal [hidden] {
	display: none !important;
}

/* ---------- Układ ---------- */

.kf-layout {
	margin-top: 10px;
}

.kf-viewer-sticky {
	position: sticky;
	top: 100px;
}

.kf-panel-col {
	padding-left: 40px;
}

/* ---------- Zakładki widoku ---------- */

.kf-viewtabs {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.kf-seg {
	display: inline-flex;
	border: 1px solid var(--kf-line);
	background: #fff;
}

.kf-seg button {
	appearance: none;
	background: none;
	border: 0;
	border-right: 1px solid var(--kf-line);
	padding: 10px 22px;
	font-family: inherit;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 1px;
	line-height: 14px;
	text-transform: uppercase;
	color: var(--kf-ink);
	cursor: pointer;
	transition: .25s;
}

.kf-seg button:last-child {
	border-right: 0;
}

.kf-seg button em {
	display: block;
	font-style: normal;
	font-size: 9px;
	letter-spacing: .5px;
	font-weight: 400;
	color: var(--kf-muted);
	text-transform: none;
	margin-top: 2px;
}

.kf-seg button:hover {
	background: var(--kf-green-soft);
}

.kf-seg button.is-active {
	background: var(--kf-green);
	border-color: var(--kf-green);
	color: #fff;
}

.kf-seg button.is-active em {
	color: rgba(255, 255, 255, .75);
}

.kf-seg button:disabled {
	opacity: .4;
	cursor: not-allowed;
	background: none;
}

.kf-seg-wide {
	display: flex;
	width: 100%;
}

.kf-seg-wide button {
	flex: 1 1 0;
	padding: 9px 8px;
	text-align: center;
}

.kf-viewtools {
	display: flex;
	gap: 8px;
}

.kf-icobtn {
	width: 38px;
	height: 38px;
	border: 1px solid var(--kf-line);
	background: #fff;
	color: var(--kf-ink);
	font-size: 13px;
	cursor: pointer;
	transition: .25s;
}

.kf-icobtn:hover,
.kf-icobtn.is-active {
	background: var(--kf-green);
	border-color: var(--kf-green);
	color: #fff;
}

/* ---------- Scena podglądu ---------- */

.kf-stage {
	position: relative;
	border: 1px solid var(--kf-line);
	background: var(--kf-bg);
	height: 62vh;
	min-height: 420px;
	overflow: hidden;
}

.kf-stage-pane {
	position: absolute;
	inset: 0;
	display: none;
}

.kf-stage-pane.is-active {
	display: block;
}

#kf-canvas {
	display: block;
	width: 100%;
	height: 100%;
	touch-action: none;
}

.kf-loader {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 12px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--kf-muted);
	background: var(--kf-bg);
}

.kf-loader[hidden] {
	display: none;
}

.kf-spin {
	width: 16px;
	height: 16px;
	border: 2px solid var(--kf-line);
	border-top-color: var(--kf-green);
	border-radius: 50%;
	animation: kf-spin .8s linear infinite;
}

@keyframes kf-spin {
	to {
		transform: rotate(360deg);
	}
}

.kf-hint {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10px;
	text-align: center;
	font-size: 10px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--kf-muted);
	pointer-events: none;
}

/* ---------- Rysunek 2D ---------- */

.kf-stage-2d {
	overflow: hidden;
	background: #fff;
}

.kf-draw {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: minmax(0, 1.55fr) minmax(0, 1fr);
	height: 100%;
}

.kf-draw-item {
	border-right: 1px solid var(--kf-line-soft);
	border-top: 1px solid var(--kf-line-soft);
	padding: 12px 16px 14px;
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
}

.kf-draw-top {
	grid-column: 1 / -1;
	border-top: 0;
}

.kf-draw-item:last-child {
	border-right: 0;
}

.kf-draw-title {
	font-size: 10px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--kf-muted);
	margin-bottom: 8px;
}

.kf-draw-svg {
	flex: 1 1 auto;
	min-height: 0;
}

.kf-draw-svg svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* ---------- Ostrzeżenia ---------- */

.kf-alert {
	margin-top: 12px;
	border-left: 3px solid #c0392b;
	background: #fdf1ef;
	padding: 10px 14px;
	font-size: 12px;
	line-height: 19px;
}

.kf-alert[hidden] {
	display: none;
}

/* ---------- Szybkie statystyki ---------- */

.kf-quickstats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border: 1px solid var(--kf-line);
	border-top: 0;
}

.kf-qs {
	padding: 12px 10px;
	text-align: center;
	border-right: 1px solid var(--kf-line-soft);
}

.kf-qs:last-child {
	border-right: 0;
}

.kf-qs span {
	display: block;
	font-size: 9px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var(--kf-muted);
	margin-bottom: 3px;
}

.kf-qs strong {
	display: block;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	color: var(--kf-green);
}

/* ---------- Panel opcji ---------- */

.kf-block {
	border-bottom: 1px solid var(--kf-line);
	padding: 22px 0 24px;
}

.kf-block:first-child {
	padding-top: 0;
}

.kf-block-title {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--kf-ink);
	margin-bottom: 18px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.kf-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	background: var(--kf-green);
	color: #fff;
	font-size: 11px;
	letter-spacing: 0;
	flex: 0 0 auto;
}

.kf-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.kf-chip {
	appearance: none;
	background: #fff;
	border: 1px solid var(--kf-line);
	padding: 8px 14px;
	font-family: inherit;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .5px;
	color: var(--kf-ink);
	cursor: pointer;
	transition: .25s;
}

.kf-chip:hover {
	border-color: var(--kf-green);
	color: var(--kf-green);
}

.kf-chip.is-active {
	background: var(--kf-green);
	border-color: var(--kf-green);
	color: #fff;
}

.kf-field {
	margin-bottom: 16px;
	flex: 1 1 0;
	min-width: 0;
}

.kf-field:last-child {
	margin-bottom: 0;
}

.kf-row {
	display: flex;
	gap: 12px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.kf-row:last-child {
	margin-bottom: 0;
}

.kf-row .kf-field {
	margin-bottom: 0;
}

.kf-field > label {
	display: block;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .8px;
	text-transform: uppercase;
	color: var(--kf-muted);
	margin-bottom: 7px;
}

.kf-field > label em {
	font-style: normal;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
}

.kf select,
.kf input[type="number"] {
	width: 100%;
	border: 1px solid var(--kf-line);
	background: #fff;
	padding: 10px 12px;
	font-family: inherit;
	font-size: 14px;
	line-height: 20px;
	color: var(--kf-ink);
	border-radius: 0;
	transition: .2s;
}

.kf select {
	appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2337474f'><path d='M7 10l5 5 5-5z'/></svg>");
	background-repeat: no-repeat;
	background-position: right 8px center;
	background-size: 18px;
	padding-right: 30px;
}

.kf select:focus,
.kf input[type="number"]:focus {
	outline: 0;
	border-color: var(--kf-green);
}

.kf-rangewrap {
	display: flex;
	align-items: center;
	gap: 14px;
}

.kf-numwrap {
	position: relative;
	flex: 0 0 118px;
}

.kf-numwrap input {
	padding-right: 38px;
	font-weight: 600;
}

.kf-unit {
	position: absolute;
	right: 11px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 11px;
	color: var(--kf-muted);
	pointer-events: none;
}

.kf-slider {
	flex: 1 1 auto;
	appearance: none;
	height: 2px;
	background: var(--kf-line);
	outline: 0;
	margin: 0;
}

.kf-slider::-webkit-slider-thumb {
	appearance: none;
	width: 16px;
	height: 16px;
	background: var(--kf-green);
	border-radius: 50%;
	cursor: pointer;
	transition: .2s;
}

.kf-slider::-webkit-slider-thumb:hover {
	transform: scale(1.15);
}

.kf-slider::-moz-range-thumb {
	width: 16px;
	height: 16px;
	background: var(--kf-green);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.kf-note {
	margin-top: 16px;
	padding-left: 12px;
	border-left: 2px solid var(--kf-green-soft);
	font-size: 12px;
	line-height: 19px;
	color: var(--kf-muted);
}

.kf-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 12px;
	font-size: 13px;
	line-height: 20px;
	cursor: pointer;
}

.kf-check input[type="checkbox"] {
	appearance: none;
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	margin-top: 1px;
	border: 1px solid var(--kf-line);
	background: #fff;
	cursor: pointer;
	transition: .2s;
}

.kf-check input[type="checkbox"]:checked {
	background: var(--kf-green);
	border-color: var(--kf-green);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 13px;
}

.kf-check span em {
	font-style: normal;
	color: var(--kf-muted);
}

.kf-field-check {
	display: flex;
	align-items: center;
}

.kf-field-check .kf-check {
	margin-top: 0;
}

/* ---------- Specyfikacja ---------- */

.kf-spec {
	margin: 0 0 22px;
	font-size: 13px;
	line-height: 20px;
}

.kf-spec div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 7px 0;
	border-bottom: 1px solid var(--kf-line-soft);
}

.kf-spec div:last-child {
	border-bottom: 0;
}

.kf-spec dt {
	color: var(--kf-muted);
	font-weight: 400;
	flex: 0 1 auto;
}

.kf-spec dd {
	margin: 0;
	text-align: right;
	font-weight: 500;
	flex: 0 1 auto;
}

.kf-spec .kf-spec-head {
	border-bottom: 1px solid var(--kf-line);
	margin-top: 10px;
}

.kf-spec .kf-spec-head dt {
	font-size: 10px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--kf-green);
	font-weight: 600;
}

/* ---------- CTA ---------- */

.kf-cta {
	display: block;
	width: 100%;
	appearance: none;
	border: 1px solid var(--kf-green);
	background: var(--kf-green);
	color: #fff;
	font-family: inherit;
	text-transform: uppercase;
	font-size: 12px;
	font-weight: 500;
	line-height: 14px;
	letter-spacing: 1.5px;
	padding: 16px 30px;
	cursor: pointer;
	transition: .3s;
}

.kf-cta:hover {
	background: #212121;
	border-color: #212121;
}

.kf-cta-note {
	margin-top: 10px;
	font-size: 11px;
	line-height: 17px;
	color: var(--kf-muted);
	text-align: center;
}

/* ---------- Pasek mobilny ---------- */

.kf-mobilebar {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1030;
	background: #fff;
	border-top: 1px solid var(--kf-line);
	box-shadow: 0 -4px 16px rgba(0, 0, 0, .07);
	padding: 10px 16px;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.kf-mobilebar-info {
	min-width: 0;               /* pozwala skrócić długie wymiary zamiast rozpychać pasek */
	overflow: hidden;
}

.kf-mobilebar-info span {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--kf-green);
	line-height: 18px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.kf-mobilebar-info em {
	display: block;
	font-style: normal;
	font-size: 10px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--kf-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.kf-cta-sm {
	width: auto;
	flex: 0 0 auto;
	padding: 13px 20px;
	font-size: 11px;
	letter-spacing: 1px;
}

/* =========================================================
   Popup wyceny
   ========================================================= */

.kf-modal .modal-content {
	border: 0;
	border-radius: 0;
}

.kf-modal .modal-header {
	border-bottom: 1px solid var(--kf-line);
	padding: 22px 30px;
	align-items: center;
}

.kf-modal .modal-title {
	font-size: 26px;
	line-height: 32px;
	letter-spacing: 1px;
	font-weight: 400;
	margin: 0;
}

.kf-modal .modal-body {
	padding: 0;
}

.kf-modal-spec {
	background: var(--kf-bg);
	border-right: 1px solid var(--kf-line);
	padding: 26px 30px 30px;
}

.kf-modal-form {
	padding: 26px 30px 34px;
}

.kf-modal-subtitle {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--kf-green);
	margin-bottom: 16px;
}

.kf-modal-preview {
	background: #fff;
	border: 1px solid var(--kf-line);
	padding: 10px;
	margin-bottom: 18px;
}

.kf-modal-preview svg {
	display: block;
	width: 100%;
	max-height: 190px;
}

.kf-form-missing {
	border: 1px dashed var(--kf-line);
	padding: 20px;
	font-size: 13px;
	line-height: 21px;
}

.kf-form-missing p:last-child {
	margin-bottom: 0;
}

/* ---------- Contact Form 7 wewnątrz popupu ---------- */

.kf-modal-form .wpcf7 {
	font-size: 13px;
}

.kf-modal-form .wpcf7 p {
	margin-bottom: 14px;
}

.kf-modal-form .wpcf7 label {
	display: block;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .8px;
	text-transform: uppercase;
	color: var(--kf-muted);
	width: 100%;
}

.kf-modal-form .wpcf7 input[type="text"],
.kf-modal-form .wpcf7 input[type="email"],
.kf-modal-form .wpcf7 input[type="tel"],
.kf-modal-form .wpcf7 input[type="number"],
.kf-modal-form .wpcf7 input[type="url"],
.kf-modal-form .wpcf7 textarea,
.kf-modal-form .wpcf7 select {
	width: 100%;
	border: 1px solid var(--kf-line);
	border-radius: 0;
	padding: 11px 13px;
	margin-top: 6px;
	font-family: inherit;
	font-size: 14px;
	line-height: 20px;
	color: var(--kf-ink);
	background: #fff;
	text-transform: none;
	letter-spacing: 0;
}

.kf-modal-form .wpcf7 input:focus,
.kf-modal-form .wpcf7 textarea:focus,
.kf-modal-form .wpcf7 select:focus {
	outline: 0;
	border-color: var(--kf-green);
}

/* Siatka 2 kolumny dla pól kontaktowych */
.kf-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 16px;
}

.kf-form-grid p {
	margin-bottom: 14px;
}

/* Ukryte pole ze specyfikacją przekazywaną do maila */
.kf-hidden-field,
.kf-hidden-field p {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	margin: -1px;
	padding: 0;
	border: 0;
}

/* Zgoda RODO */
.kf-modal-form .wpcf7-acceptance .wpcf7-list-item {
	margin: 0;
}

.kf-modal-form .wpcf7-acceptance label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	text-transform: none;
	letter-spacing: 0;
	font-size: 12px;
	line-height: 18px;
	font-weight: 400;
	color: var(--kf-ink);
	cursor: pointer;
}

.kf-modal-form .wpcf7-acceptance input[type="checkbox"] {
	appearance: none;
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	margin-top: 1px;
	border: 1px solid var(--kf-line);
	background: #fff;
	cursor: pointer;
}

.kf-modal-form .wpcf7-acceptance input[type="checkbox"]:checked {
	background: var(--kf-green);
	border-color: var(--kf-green);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 13px;
}

.kf-modal-form .wpcf7 input[type="submit"] {
	display: inline-block;
	width: 100%;
	border: 1px solid var(--kf-green);
	background: var(--kf-green);
	color: #fff;
	text-transform: uppercase;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 1.5px;
	padding: 15px 30px;
	border-radius: 0;
	cursor: pointer;
	transition: .3s;
	margin-top: 4px;
}

.kf-modal-form .wpcf7 input[type="submit"]:hover {
	background: #212121;
	border-color: #212121;
}

.kf-modal-form .wpcf7-not-valid-tip {
	font-size: 11px;
	color: #c0392b;
	margin-top: 4px;
}

.kf-modal-form .wpcf7 .wpcf7-response-output {
	margin: 16px 0 0;
	padding: 12px 15px;
	font-size: 13px;
	line-height: 20px;
	border-width: 1px;
}

.kf-modal-form .wpcf7 form.sent .wpcf7-response-output {
	border-color: var(--kf-green);
}

.kf-modal-form .wpcf7-spinner {
	display: block;
	margin: 8px auto 0;
}

/* =========================================================
   Responsywność
   ========================================================= */

@media only screen and (max-width: 1199px) {

	.kf-panel-col {
		padding-left: 24px;
	}

	.kf-stage {
		height: 55vh;
		min-height: 360px;
	}
}

@media only screen and (max-width: 991px) {

	.kf-viewer-sticky {
		position: static;
	}

	.kf-panel-col {
		padding-left: 12px;
		padding-top: 34px;
	}

	.kf-stage {
		height: 48vh;
		min-height: 320px;
	}

	.kf-modal-spec {
		border-right: 0;
		border-bottom: 1px solid var(--kf-line);
	}

	.kf-summary-block {
		padding-bottom: 90px;
	}

	.kf-mobilebar {
		display: flex;
	}
}

@media only screen and (max-width: 640px) {

	.kf-draw {
		grid-template-columns: 1fr;
	}

	.kf-draw-item {
		border-right: 0;
	}

	.kf-quickstats {
		grid-template-columns: 1fr 1fr;
	}

	.kf-qs:nth-child(2) {
		border-right: 0;
	}

	.kf-qs:nth-child(1),
	.kf-qs:nth-child(2) {
		border-bottom: 1px solid var(--kf-line-soft);
	}

	.kf-rangewrap {
		flex-wrap: wrap;
	}

	.kf-numwrap {
		flex: 1 1 100%;
	}

	.kf-seg button {
		padding: 9px 12px;
		font-size: 10px;
		letter-spacing: .5px;
	}

	.kf-row .kf-field {
		flex: 1 1 100%;
	}

	.kf-form-grid {
		grid-template-columns: 1fr;
	}

	.kf-modal .modal-header,
	.kf-modal-spec,
	.kf-modal-form {
		padding-left: 18px;
		padding-right: 18px;
	}

	.kf-modal .modal-title {
		font-size: 21px;
		line-height: 27px;
	}
}
