/*!
 * CW Contact Form - front-end styles.
 *
 * Everything lives under .cwcf with low specificity. Override the look from the
 * theme by redefining the --cwcf-* variables on .cwcf (or on a parent), e.g.
 *   .con-right .cwcf { --cwcf-accent: #E4125C; --cwcf-radius: 16px; }
 *
 * Variables: --cwcf-accent, --cwcf-btn-bg, --cwcf-btn-color, --cwcf-btn-shadow,
 * --cwcf-btn-radius, --cwcf-text, --cwcf-muted, --cwcf-label, --cwcf-input-color,
 * --cwcf-placeholder, --cwcf-line, --cwcf-error, --cwcf-success, --cwcf-bg,
 * --cwcf-radius, --cwcf-pad, --cwcf-gap, --cwcf-border, --cwcf-shadow,
 * --cwcf-font, --cwcf-heading-font, --cwcf-input-size.
 *
 * Fonts (Bitter / Mukta) are loaded by the theme; only font-family is set here.
 */

.cwcf {
	--cwcf-accent: #E4125C;
	--cwcf-btn-bg: #EB555B;
	--cwcf-btn-color: #fff;
	--cwcf-btn-shadow: rgba(235, 85, 91, .55);
	--cwcf-btn-radius: 27px;
	--cwcf-text: #404040;
	--cwcf-muted: #6b6b6b;
	--cwcf-label: #525252;
	--cwcf-input-color: #606266;
	--cwcf-placeholder: #8c8c8c;
	--cwcf-line: #d5d7db;
	--cwcf-line-hover: #b4b7bd;
	--cwcf-error: #C62828;
	--cwcf-success: #2E7D32;
	--cwcf-bg: #fff;
	--cwcf-radius: 25px;
	--cwcf-pad: 40px;
	--cwcf-gap: 24px;
	--cwcf-border: 4px solid rgba(255, 255, 255, .4);
	--cwcf-shadow: 0 4px 55px rgba(0, 0, 0, .25), inset -2px 2px 4px #fff;
	--cwcf-font: 'Mukta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--cwcf-heading-font: 'Bitter', Georgia, 'Times New Roman', serif;
	--cwcf-input-size: 16px;

	position: relative;
	box-sizing: border-box;
	container-type: inline-size;
	width: 100%;
	padding: var(--cwcf-pad);
	background: var(--cwcf-bg);
	border: var(--cwcf-border);
	border-radius: var(--cwcf-radius);
	box-shadow: var(--cwcf-shadow);
	color: var(--cwcf-text);
	font-family: var(--cwcf-font);
	font-size: 16px;
	line-height: 1.5;
	text-align: left;
}

.cwcf *,
.cwcf *::before,
.cwcf *::after {
	box-sizing: border-box;
}

.cwcf p { margin: 0; }
.cwcf [hidden] { display: none !important; }

/* Card without chrome (e.g. inside the theme's .zapytaj_box which has its own card). */
.cwcf--plain,
.zapytaj_box .cwcf {
	--cwcf-pad: 0px;
	--cwcf-border: 0 solid transparent;
	--cwcf-shadow: none;
	--cwcf-bg: transparent;
	--cwcf-radius: 0;
}
.zapytaj_box .cwcf { max-width: 80%; margin: 0 auto; }

/* ------------------------------------------------------------ main block */

.cwcf__main {
	transition: opacity .25s ease, transform .25s ease;
}
.cwcf__main.is-leaving {
	opacity: 0;
	transform: translateY(-6px);
	pointer-events: none;
}

.cwcf .cwcf__title {
	margin: 0 0 24px;
	padding: 0;
	text-align: center;
	font-family: var(--cwcf-heading-font);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--cwcf-text);
}
/* Short accent bar under the heading. */
.cwcf .cwcf__title::after {
	content: "";
	display: block;
	width: 36px;
	height: 3px;
	margin: 12px auto 0;
	border-radius: 3px;
	background: var(--cwcf-btn-bg);
}
.cwcf .cwcf__title + .cwcf__subtitle { margin-top: -10px; }
.cwcf .cwcf__subtitle {
	margin: 0 0 28px;
	text-align: center;
	font-size: 15px;
	line-height: 1.45;
	color: var(--cwcf-muted);
}

.cwcf__noscript {
	padding: 12px 14px;
	margin-bottom: 16px;
	border-radius: 12px;
	background: #fdecea;
	color: #8e1b1b;
	font-size: 14px;
}
.cwcf__noscript a { color: inherit; font-weight: 600; }

/* --------------------------------------------------------------- fields */

.cwcf__field {
	position: relative;
	margin: 0 0 var(--cwcf-gap);
}

.cwcf .cwcf__label {
	display: block;
	margin: 0 0 2px;
	padding: 0;
	font-family: var(--cwcf-font);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--cwcf-label);
	transition: color .2s ease;
}
.cwcf .cwcf__req { margin-left: 1px; color: #C62828; }
.cwcf .cwcf__field:focus-within .cwcf__label { color: var(--cwcf-accent); }
.cwcf .cwcf__field.is-invalid .cwcf__label { color: var(--cwcf-error); }

.cwcf__control {
	position: relative;
	display: block;
}

.cwcf .cwcf__input {
	display: block;
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 10px 0;
	font-family: inherit;
	font-size: var(--cwcf-input-size);
	font-weight: 400;
	line-height: 1.5;
	color: var(--cwcf-input-color);
	background-color: transparent;
	border: 0;
	border-bottom: 1px solid var(--cwcf-line);
	border-radius: 0;
	box-shadow: none;
	outline: 0;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .2s ease;
}
.cwcf .cwcf__input:hover { border-bottom-color: var(--cwcf-line-hover); }
.cwcf .cwcf__input:focus {
	color: var(--cwcf-input-color);
	outline: 0;
	box-shadow: none;
}
.cwcf .cwcf__input::placeholder {
	color: var(--cwcf-placeholder);
	opacity: 1;
}
.cwcf .cwcf__control--check .cwcf__input { padding-right: 40px; }

/* Animated focus line (grows from the centre). */
.cwcf__line {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: var(--cwcf-accent);
	transform: scaleX(0);
	transform-origin: 50% 50%;
	transition: transform .3s cubic-bezier(.4, 0, .2, 1), background-color .2s ease;
	pointer-events: none;
}
.cwcf .cwcf__control:focus-within .cwcf__line { transform: scaleX(1); }
.cwcf .cwcf__field.is-invalid .cwcf__line {
	transform: scaleX(1);
	background: var(--cwcf-error);
}

/* Subtle "valid" tick after blur. */
.cwcf__control--check::after {
	content: "";
	position: absolute;
	right: 12px;
	top: 50%;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%232E7D32' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	opacity: 0;
	transform: scale(.6);
	transition: opacity .25s ease, transform .25s ease;
	pointer-events: none;
}
.cwcf .cwcf__field.is-valid .cwcf__control--check::after {
	opacity: 1;
	transform: scale(1);
}

/* Phone: fixed "+48" pill with a PL flag. */
.cwcf__control--phone {
	display: flex;
	align-items: center;
}
.cwcf__prefix {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0 4px 0 0;
	padding: 6px 12px 6px 10px;
	border: 1px solid #e6e7ea;
	border-radius: 999px;
	background: #f7f7f8;
	color: var(--cwcf-text);
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
}
.cwcf__flag { display: block; flex: none; border-radius: 2px; }
.cwcf .cwcf__control--phone .cwcf__input {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	padding-left: 12px;
}

/* Select: own chevron. */
.cwcf .cwcf__select {
	padding-right: 40px;
	cursor: pointer;
	text-overflow: ellipsis;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 4.75l5 5 5-5' fill='none' stroke='%23606266' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 14px 14px;
}
.cwcf .cwcf__select:required:invalid { color: var(--cwcf-placeholder); }
.cwcf .cwcf__select option { color: var(--cwcf-text); }

/* Date: native control, same underline look. */
.cwcf .cwcf__date {
	min-height: 48px;
	padding-right: 12px;
}
.cwcf .cwcf__date::-webkit-date-and-time-value { text-align: left; }
.cwcf .cwcf__date::-webkit-calendar-picker-indicator {
	cursor: pointer;
	opacity: .6;
}

/* Textarea: auto height (JS), 4 -> 12 rows. */
.cwcf .cwcf__textarea {
	resize: none;
	overflow-y: auto;
	min-height: calc(4 * 1.5em + 23px);
	max-height: calc(12 * 1.5em + 23px);
}

/* Error row + counter. */
.cwcf__foot {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}
.cwcf__error {
	flex: 1 1 auto;
	min-width: 0;
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	visibility: hidden;
	transition: grid-template-rows .25s ease, opacity .2s ease, visibility 0s linear .25s;
}
.cwcf .cwcf__field.is-invalid .cwcf__error {
	grid-template-rows: 1fr;
	opacity: 1;
	visibility: visible;
	transition-delay: 0s;
}
.cwcf__error-inner {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	min-height: 0;
	overflow: hidden;
	font-size: 13px;
	line-height: 1.4;
	color: var(--cwcf-error);
}
.cwcf__error-inner > * { margin-top: 6px; }
.cwcf__error-inner .cwcf__icon { flex: none; margin-top: 8px; }

.cwcf__counter {
	flex: none;
	margin-top: 6px;
	font-size: 12px;
	line-height: 1.4;
	color: var(--cwcf-placeholder);
	font-variant-numeric: tabular-nums;
	opacity: 0;
	transition: opacity .2s ease, color .2s ease;
}
.cwcf .cwcf__field:focus-within .cwcf__counter,
.cwcf .cwcf__field.has-value .cwcf__counter { opacity: 1; }
.cwcf .cwcf__counter.is-near { color: #B45309; }
.cwcf .cwcf__counter.is-limit { color: var(--cwcf-error); font-weight: 600; }

/* Honeypot: off-screen, not focusable, not announced. */
.cwcf .cwcf__hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
}

.cwcf__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.cwcf__turnstile { margin: 0 0 var(--cwcf-gap); min-height: 0; }

/* ----------------------------------------------------------- alert banner */

.cwcf__alert {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 18px;
	padding: 12px 14px;
	border: 1px solid #f1b8b5;
	border-radius: 12px;
	background: #fdecea;
	color: #8e1b1b;
	font-size: 14px;
	line-height: 1.45;
	animation: cwcf-in .3s ease both;
}
.cwcf__alert .cwcf__icon { flex: none; margin-top: 3px; }
.cwcf__alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.cwcf__alert--info {
	border-color: #c6d9ee;
	background: #eef4fb;
	color: #1f4e79;
}

/* ----------------------------------------------------------------- button */

.cwcf__actions {
	display: flex;
	justify-content: center;
	margin: 8px 0 0;
}
.cwcf .cwcf__submit {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 70%;
	min-width: 160px;
	min-height: 46px;
	margin: 0 auto;
	padding: 10px;
	border: 0;
	border-radius: var(--cwcf-btn-radius);
	background: linear-gradient(93.47deg, rgba(0, 0, 0, .12) -7.47%, rgba(0, 0, 0, 0) 59.25%), var(--cwcf-btn-bg);
	background-color: var(--cwcf-btn-bg);
	color: var(--cwcf-btn-color);
	font-family: var(--cwcf-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	text-transform: none;
	text-shadow: none;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.cwcf .cwcf__submit:hover {
	color: var(--cwcf-btn-color);
	transform: translateY(-1px);
	box-shadow: 0 10px 22px -8px var(--cwcf-btn-shadow);
}
.cwcf .cwcf__submit:active {
	color: var(--cwcf-btn-color);
	transform: translateY(1px) scale(.99);
	box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
.cwcf .cwcf__submit:focus-visible {
	outline: 0;
	box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--cwcf-text);
}
.cwcf .cwcf__submit:disabled,
.cwcf .cwcf__submit[aria-disabled="true"] {
	cursor: progress;
	transform: none;
	filter: saturate(.85);
	box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}

.cwcf__spinner {
	display: none;
	flex: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: cwcf-spin .7s linear infinite;
}
.cwcf.is-loading .cwcf__spinner { display: inline-block; }

.cwcf .cwcf__privacy {
	max-width: 340px;
	margin: 18px auto 0;
	text-align: center;
	font-size: 12px;
	line-height: 1.5;
	color: var(--cwcf-muted);
}
.cwcf .cwcf__privacy a { color: var(--cwcf-text); text-decoration: underline; }

/* ---------------------------------------------------------------- success */

.cwcf__success {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 12px 0;
	text-align: center;
	outline: 0;
	animation: cwcf-in .4s ease both;
}
.cwcf__success:focus { outline: 0; }
.cwcf .cwcf__success-title {
	margin: 18px 0 6px;
	padding: 0;
	font-family: var(--cwcf-heading-font);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--cwcf-text);
}
.cwcf .cwcf__success-text {
	font-size: 17px;
	color: var(--cwcf-label);
}
.cwcf__check { display: block; }
.cwcf__check-circle {
	stroke: var(--cwcf-success);
	stroke-width: 2.5;
	stroke-dasharray: 151;
	stroke-dashoffset: 151;
	animation: cwcf-draw .6s ease-out .1s forwards;
}
.cwcf__check-mark {
	stroke: var(--cwcf-success);
	stroke-width: 3.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 40;
	stroke-dashoffset: 40;
	animation: cwcf-draw .35s ease-out .6s forwards;
}

/* -------------------------------------------------------------- keyframes */

@keyframes cwcf-spin { to { transform: rotate(360deg); } }
@keyframes cwcf-draw { to { stroke-dashoffset: 0; } }
@keyframes cwcf-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

/* Wide card (e.g. full-width page): short fields side by side. */
@container (min-width: 560px) {
	.cwcf__form {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: 32px;
	}
	.cwcf__form > * { grid-column: 1 / -1; }
	.cwcf__form > .cwcf__field--name,
	.cwcf__form > .cwcf__field--email,
	.cwcf__form > .cwcf__field--phone,
	.cwcf__form > .cwcf__field--city { grid-column: auto; }
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 1140px) {
	.zapytaj_box .cwcf { max-width: 100%; }
}

@media (max-width: 600px) {
	.cwcf { --cwcf-pad: 20px; --cwcf-gap: 22px; }
	.cwcf--plain,
	.zapytaj_box .cwcf { --cwcf-pad: 0px; }
	.cwcf .cwcf__submit { width: 100%; }
	.cwcf .cwcf__title { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
	.cwcf *,
	.cwcf *::before,
	.cwcf *::after {
		animation-duration: .01ms !important;
		animation-delay: 0s !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		transition-delay: 0s !important;
		scroll-behavior: auto !important;
	}
	.cwcf .cwcf__submit:hover,
	.cwcf .cwcf__submit:active { transform: none; }
}

/* ------------------------------------------------------- additions (v1.1) */

.cwcf__alert:focus { outline: 0; }
.cwcf__alert:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.cwcf__hint {
	display: block;
	margin: 4px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: var(--cwcf-muted);
}

.cwcf .cwcf__success-phone {
	margin-top: 14px;
	font-size: 14px;
	color: var(--cwcf-muted);
}
.cwcf .cwcf__success-phone a { color: var(--cwcf-text); font-weight: 600; text-decoration: none; white-space: nowrap; }
.cwcf .cwcf__success-phone a:hover { text-decoration: underline; }

.cwcf .cwcf__again {
	margin: 16px 0 0;
	padding: 6px 4px;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--cwcf-text);
	font-family: var(--cwcf-font);
	font-size: 14px;
	line-height: 1.4;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.cwcf .cwcf__again:hover { color: var(--cwcf-accent); }
.cwcf .cwcf__again:focus-visible {
	outline: 0;
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--cwcf-text);
	border-radius: 4px;
}

/* ===================================================== filled style (v1.1)
 * Soft filled fields with a rounded focus ring instead of the old underline.
 * !important only where the theme forces its own (.con-right input/textarea
 * { border-*: none !important; border-radius: 0 !important } and
 * .con-right label { font-weight: 400 !important }).
 */
.cwcf {
	--cwcf-field-bg: #f5f5f7;
	--cwcf-field-bg-hover: #efeff2;
	--cwcf-field-radius: 14px;
	--cwcf-ring: rgba(235, 85, 91, .18);
	--cwcf-gap: 18px;
}

.cwcf .cwcf__label {
	margin: 0 0 7px;
	font-size: 14px;
	font-weight: 600 !important;
	color: #2f2f33;
	letter-spacing: .005em;
}
.cwcf .cwcf__field:focus-within .cwcf__label { color: #2f2f33; }

.cwcf .cwcf__input,
.cwcf .cwcf__control--phone {
	min-height: 52px;
	background-color: var(--cwcf-field-bg);
	border: 1.5px solid transparent !important;
	border-radius: var(--cwcf-field-radius) !important;
	transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.cwcf .cwcf__input {
	padding: 13px 16px;
	color: #2f2f33;
}
.cwcf .cwcf__input:hover,
.cwcf .cwcf__control--phone:hover { background-color: var(--cwcf-field-bg-hover); }
.cwcf .cwcf__input:focus,
.cwcf .cwcf__control--phone:focus-within {
	background-color: #fff;
	border-color: var(--cwcf-btn-bg) !important;
	box-shadow: 0 0 0 4px var(--cwcf-ring);
}
.cwcf .cwcf__field.is-invalid .cwcf__input,
.cwcf .cwcf__field.is-invalid .cwcf__control--phone {
	background-color: #fff6f6;
	border-color: var(--cwcf-error) !important;
}
.cwcf .cwcf__field.is-invalid .cwcf__input:focus,
.cwcf .cwcf__field.is-invalid .cwcf__control--phone:focus-within {
	box-shadow: 0 0 0 4px rgba(198, 40, 40, .14);
}
.cwcf .cwcf__line { display: none; }

/* Phone: the whole row is the field, "+48" is a segment inside it. */
.cwcf .cwcf__control--phone { overflow: hidden; }
.cwcf .cwcf__control--phone .cwcf__input {
	min-height: 49px;
	padding-left: 12px;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}
.cwcf .cwcf__prefix {
	align-self: stretch;
	margin: 0;
	padding: 0 12px 0 16px;
	border: 0;
	border-right: 1px solid #e2e2e7;
	border-radius: 0;
	background: transparent;
	font-size: 15px;
	font-weight: 600;
	color: #2f2f33;
}

.cwcf .cwcf__select { background-position: right 16px center; padding-right: 44px; }
.cwcf .cwcf__date { min-height: 52px; }
.cwcf .cwcf__textarea {
	min-height: calc(4 * 1.5em + 28px);
	max-height: calc(12 * 1.5em + 28px);
}
.cwcf__control--check::after { right: 16px; }
.cwcf .cwcf__control--check .cwcf__input { padding-right: 44px; }

/* Button: compact pill with an arrow. */
.cwcf__actions { margin-top: 10px; }
.cwcf .cwcf__submit {
	width: 100%;
	max-width: 340px;
	min-height: 54px;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: .01em;
	box-shadow: 0 10px 24px -12px var(--cwcf-btn-shadow);
}
.cwcf .cwcf__submit::after {
	content: "";
	width: 18px;
	height: 18px;
	flex: none;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10h11m-4.5-4.5L15 10l-4.5 4.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10h11m-4.5-4.5L15 10l-4.5 4.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform .2s ease;
}
.cwcf .cwcf__submit:hover::after { transform: translateX(3px); }
.cwcf.is-loading .cwcf__submit::after { display: none; }

@media (max-width: 600px) {
	.cwcf .cwcf__submit { max-width: none; }
}
