/* =========================================================
   FORMULARZE BITRIX24 (od 28.09.2026 zamiast CF7)
   Wygląd 1:1 z dawnymi formularzami CF7 (hero.css „CF7 — FORM",
   houses.css „CF7 – HOUSES"). Bitrix wstrzykuje własny arkusz
   (app.bundle.min.css) + zmienne per formularz — stąd !important.
   Wrapper: <div class="fc-b24"> z inc/forms.php.
   ========================================================= */

.fc-b24 {
	--b24-font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
	width: 100%;
	min-width: 0;
}

/* Zmienne Bitrixa (ustawiane na #b24-<id> — nadpisujemy z wyższą specyficznością) */
.fc-b24 .b24-form [id^="b24-"],
.fc-b24 .b24-form .b24-form-style-classic {
	--b24-primary-color: var(--color-primary) !important;
	--b24-primary-hover-color: var(--color-third) !important;
	--b24-primary-text-color: var(--color-cta-primary-text) !important;
	--b24-text-color: var(--color-primary) !important;
	--b24-background-color: transparent !important;
	--b24-field-background-color: rgba(255, 255, 255, 0.2) !important;
	--b24-field-focus-background-color: rgba(255, 255, 255, 0.26) !important;
	--b24-field-border-color: #FFFFFF !important;
	--b24-font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
}

.fc-b24 .b24-form,
.fc-b24 .b24-form * {
	box-sizing: border-box !important;
}

/* ---------- ramka Bitrixa: bez tła, paddingów, bordera, min-height ---------- */

.fc-b24 .b24-form-wrapper {
	background: transparent !important;
	min-height: 0 !important;
	max-width: none !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

.fc-b24 .b24-form-wrapper.b24-from-state-on {
	min-height: 260px !important;
}

.fc-b24 .b24-form-header-padding,
.fc-b24 .b24-form-header {
	display: none !important;
}

.fc-b24 .b24-form-content,
.fc-b24 .b24-form-padding-side {
	padding: 0 !important;
}

.fc-b24 .b24-form-content form {
	margin: 0 !important;
}

/* stopka „Zgłoś nadużycie" */
.fc-b24 .b24-form-sign {
	display: none !important;
}

/* ---------- pola tekstowe ---------- */

.fc-b24 form > div:first-of-type {
	display: flex !important;
	flex-direction: column !important;
	gap: 20px !important;
}

.fc-b24 .b24-form-field {
	margin: 0 !important;
	padding: 0 !important;
}

.fc-b24 .b24-form-control-string .b24-form-control-container {
	margin: 0 !important;
}

.fc-b24 .b24-form-control-string .b24-form-control {
	display: block !important;
	width: 100% !important;
	height: var(--fc-input-h, 42px) !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 12px 16px !important;
	background: rgba(255, 255, 255, 0.2) !important;
	background-image: none !important;
	border: 1px solid #FFFFFF !important;
	border-radius: 1px !important;
	box-shadow: none !important;
	font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
	font-weight: 400 !important;
	font-size: 14px !important;
	line-height: 125% !important;
	letter-spacing: normal !important;
	color: var(--color-primary) !important;
	outline: none !important;
	transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease !important;
}

.fc-b24 .b24-form-control-string .b24-form-control:focus {
	transform: translateY(-1px);
	background: rgba(255, 255, 255, 0.26) !important;
	box-shadow: 0 8px 20px rgba(55, 32, 94, 0.12) !important;
}

.fc-b24 input.b24-form-control:-webkit-autofill {
	-webkit-box-shadow: 0 0 0 60px #F2C78C inset !important;
	-webkit-text-fill-color: var(--color-primary) !important;
}

/* Etykieta Bitrixa działa jak placeholder CF7: w polu, znika po wpisaniu/fokusie */
.fc-b24 .b24-form-control-string .b24-form-control-label {
	top: 50% !important;
	left: 0 !important;
	right: 0 !important;
	transform: translateY(-50%) !important;
	padding: 0 16px !important;
	margin: 0 !important;
	font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
	font-weight: 400 !important;
	font-size: 14px !important;
	line-height: 125% !important;
	color: var(--color-primary) !important;
	opacity: 1 !important;
	transition: opacity 150ms ease !important;
}

.fc-b24 .b24-form-control:focus + .b24-form-control-label,
.fc-b24 .b24-form-control-not-empty + .b24-form-control-label {
	opacity: 0 !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	font-size: 14px !important;
}

.fc-b24 .b24-form-control-icon-after .b24-form-control,
.fc-b24 .b24-form-control-icon-after .b24-form-control-label {
	padding-right: 16px !important;
}

/* Gwiazdka „wymagane" w polach — CF7 jej nie pokazywał */
.fc-b24 .b24-form-control-string .b24-form-control-required {
	display: none !important;
}

/* ---------- komunikaty błędów ---------- */

.fc-b24 .b24-form-control-alert {
	margin-bottom: 18px !important;
}

.fc-b24 .b24-form-control-alert-message {
	left: 0 !important;
	top: 100% !important;
	margin-top: 2px !important;
	font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
	font-size: 11px !important;
	line-height: 1.2 !important;
	border-radius: 1px !important;
}

.fc-b24 .b24-form-control-alert .b24-form-control {
	border-color: #f25830 !important;
}

/* ---------- zgody ---------- */

.fc-b24 form > div:nth-of-type(2) {
	display: flex !important;
	flex-direction: column !important;
	gap: 10px !important;
	margin-top: 15px !important;
}

.fc-b24 .b24-form-field-agreement .b24-form-control-container {
	margin: 0 !important;
	line-height: 1 !important;
}

.fc-b24 .b24-form-field-agreement label {
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
	min-height: 16px !important;
	margin: 0 !important;
	padding: 0 !important;
	cursor: pointer !important;
	line-height: 1 !important;
}

.fc-b24 .b24-form-field-agreement input[type="checkbox"] {
	width: 16px !important;
	height: 16px !important;
	flex: 0 0 16px !important;
	margin: 0 !important;
	padding: 0 !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	background: #FFFFFF !important;
	border: 0.5px solid #FFFFFF !important;
	border-radius: 1px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
}

.fc-b24 .b24-form-field-agreement input[type="checkbox"]:checked::after {
	content: "";
	width: 8px;
	height: 8px;
	background: var(--color-primary);
	border-radius: 1px;
}

.fc-b24 .b24-form-field-agreement .b24-form-control-desc,
.fc-b24 .b24-form-field-agreement .b24-form-field-agreement-link,
.fc-b24 .b24-form-field-agreement .b24-form-control-required {
	font-family: "Jost", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
	font-weight: 400 !important;
	font-size: 8px !important;
	line-height: 9px !important;
	color: var(--color-primary) !important;
	opacity: 1 !important;
	text-decoration: none !important;
	white-space: normal !important;
}

.fc-b24 .b24-form-field-agreement .b24-form-control-required {
	margin-left: -5px !important;
}

/* link do treści zgody (Bitrix otwiera popup) */
.fc-b24 .b24-form-field-agreement .b24-form-field-agreement-link:hover {
	text-decoration: underline !important;
}

/* komunikat „zaznacz zgodę" pod checkboxem (display przełącza Bitrix — nie ruszać) */
.fc-b24 .b24-form-field-agreement .b24-form-control-alert-message {
	position: static !important;
	margin: 4px 0 0 24px !important;
}

.fc-b24 .b24-form-field-agreement.b24-form-control-alert {
	margin-bottom: 0 !important;
}

/* ---------- przycisk ---------- */

.fc-b24 .b24-form-btn-container {
	display: flex !important;
	margin: 5px 0 0 !important;
}

.fc-b24 .b24-form-btn-block {
	padding: 0 !important;
	flex: 0 0 auto !important;
}

.fc-b24 .b24-form-btn-container .b24-form-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 15px !important;
	width: auto !important;
	min-width: 238px !important;
	min-height: 47px !important;
	height: 47px !important;
	margin: 15px 0 0 !important;
	padding: 12px 29px 12px 35px !important;
	background: var(--color-primary) !important;
	border: 0 !important;
	border-radius: 2px !important;
	box-shadow: none;
	font-family: "Jost", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
	font-weight: 600 !important;
	font-size: 16px !important;
	line-height: 145% !important;
	letter-spacing: -0.005em !important;
	color: var(--color-cta-primary-text) !important;
	white-space: nowrap !important;
	cursor: pointer !important;
	animation: fcB24CtaPulse 4.6s ease-in-out infinite;
	transition: transform 180ms ease, background-color 180ms ease, color 180ms ease !important;
}

/* strzałka jak w .btn__icon--arrow */
.fc-b24 .b24-form-btn-container .b24-form-btn::after {
	content: "";
	display: block;
	width: 12px;
	height: 12px;
	margin-left: auto;
	background: url("/wp-content/uploads/2026/02/btn_arrow.svg") center / contain no-repeat;
}

.fc-b24 .b24-form-btn-container .b24-form-btn:hover {
	transform: translateY(-1px);
	background: var(--color-third) !important;
	color: var(--color-primary) !important;
}

.fc-b24 .b24-form-btn-container .b24-form-btn:hover::after {
	filter: brightness(0) saturate(100%) invert(18%) sepia(35%) saturate(1180%) hue-rotate(230deg);
}

@keyframes fcB24CtaPulse {
	0%,
	82%,
	100% {
		box-shadow: 0 0 0 0 rgba(55, 32, 94, 0);
	}

	90% {
		box-shadow: 0 0 0 8px rgba(55, 32, 94, 0.10);
	}
}

/* ---------- stany: wysyłanie / sukces / błąd ---------- */

.fc-b24 .b24-form-state,
.fc-b24 .b24-form-loader {
	background: var(--color-secondary) !important;
}

.fc-b24 .b24-form-state-text,
.fc-b24 .b24-form-state-text p {
	font-family: "Jost", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
	font-size: 18px !important;
	font-weight: 600 !important;
	color: var(--color-primary) !important;
}

.fc-b24 .b24-form-state-container .b24-form-error .b24-form-btn {
	color: var(--color-primary) !important;
	border-color: var(--color-primary) !important;
}

/* =========================================================
   HERO / KONTAKT — kolumna o szerokości var(--fc-form-w)
   ========================================================= */

.hero__form .fc-b24 {
	width: var(--fc-form-w);
	max-width: 100%;
}

@media (max-width: 991px) {
	.hero__form .fc-b24 {
		width: 100%;
	}
}

/* =========================================================
   DOMY — 4 pola w 2 kolumnach, pod nimi zgody (lewo) i przycisk (prawo)
   ========================================================= */

.fc-form--houses .fc-b24 form {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) minmax(0, 320px) !important;
	column-gap: 28px !important;
	row-gap: 14px !important;
	align-items: start !important;
}

.fc-form--houses .fc-b24 form > div:first-of-type {
	grid-column: 1 / -1 !important;
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 14px 22px !important;
}

.fc-form--houses .fc-b24 form > div:nth-of-type(2) {
	grid-column: 1 !important;
	margin-top: 2px !important;
	gap: 8px !important;
}

.fc-form--houses .fc-b24 .b24-form-btn-container {
	grid-column: 2 !important;
	justify-content: flex-end !important;
	margin: 0 !important;
}

.fc-form--houses .fc-b24 .b24-form-btn-container .b24-form-btn {
	width: 189px !important;
	min-width: 0 !important;
	height: 45px !important;
	min-height: 45px !important;
	margin: 0 !important;
	padding: 12px 20px !important;
	justify-content: center !important;
	animation: none;
}

.fc-form--houses .fc-b24 .b24-form-btn-container .b24-form-btn::after {
	margin-left: 0;
}

.fc-form--houses .fc-b24 .b24-form-field-agreement .b24-form-control-desc,
.fc-form--houses .fc-b24 .b24-form-field-agreement .b24-form-field-agreement-link {
	font-weight: 500 !important;
}

@media (max-width: 991px) {
	.fc-form--houses .fc-b24 form {
		grid-template-columns: 1fr !important;
	}

	.fc-form--houses .fc-b24 form > div:first-of-type {
		grid-template-columns: 1fr !important;
	}

	.fc-form--houses .fc-b24 .b24-form-btn-container,
	.fc-form--houses .fc-b24 .b24-form-btn-block {
		grid-column: 1 !important;
		justify-content: flex-start !important;
		width: 100% !important;
	}

	.fc-form--houses .fc-b24 .b24-form-btn-container .b24-form-btn {
		width: 100% !important;
	}
}

@media (max-width: 640px) {
	.hero__form .fc-b24 .b24-form-btn-container,
	.hero__form .fc-b24 .b24-form-btn-block {
		width: 100% !important;
	}

	.hero__form .fc-b24 .b24-form-btn-container .b24-form-btn {
		width: 100% !important;
		max-width: 320px !important;
		min-width: 0 !important;
	}
}
