/* Formularze weronikagolec.pl (golec-forms.php) – wygląd dotychczasowych formularzy (ankieta jak
   /ankieta-kredyt-hipoteczny/, pola i przyciski jak „Porozmawiajmy” i konsultacja). Prefiks .wgf wygrywa ze stylami
   motywu dla pól i przycisków. */

.wgf {
	--wgf-gold: #B8860B;
	--wgf-gold-ink: #8A6508;
	--wgf-tint: #FBF6EA;
	--wgf-line: rgba(51, 51, 51, .14);
	--wgf-field-line: #DCD3C2;
	--wgf-text: #333;
	--wgf-soft: #666;
	--wgf-grad: linear-gradient(120deg, #BA860B 0%, #E6C35A 30%, #FFF0A8 45%, #E6C35A 60%, #BA860B 100%);
	box-sizing: border-box;
	width: 100%;
	font-family: "Figtree", sans-serif;
	color: var(--wgf-text);
	text-align: left;
}

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

.wgf fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

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

.wgf .wgf-error {
	margin: .9rem 0 0;
	font-size: .92rem;
	font-weight: 600;
	color: #B42318;
}

/* przycisk złoty */
.wgf .wgf-btn,
.wgf .wgf-btn:hover,
.wgf .wgf-btn:focus {
	display: block;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 14px 26px;
	/* !important: wygrywa ze stylami przycisków z Elementora i motywu, gdy formularz stoi w ich widżecie */
	border: 0 !important;
	border-radius: 14px !important;
	background: var(--wgf-grad) !important;
	box-shadow: 0 4px 12px rgba(186, 134, 11, .25), inset 0 1px 0 rgba(255, 255, 255, .25) !important;
	font: 700 17px/1.3 "Figtree", sans-serif !important;
	color: #2B2B2B !important;
	text-align: center;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}

.wgf .wgf-btn:hover {
	opacity: .92;
}

.wgf .wgf-btn:focus-visible {
	outline: 2px solid var(--wgf-gold);
	outline-offset: 2px;
}

/* --- ankieta ------------------------------------------------------------ */
.wgf-survey__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 2rem;
	margin-bottom: .7rem;
}

.wgf .wgf-back,
.wgf .wgf-back:hover,
.wgf .wgf-back:focus {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	margin: 0;
	padding: .3rem 0;
	border: 0;
	background: none;
	box-shadow: none;
	font: 600 .88rem "Figtree", sans-serif;
	color: var(--wgf-soft);
	cursor: pointer;
}

.wgf .wgf-back:hover {
	color: var(--wgf-gold-ink);
}

.wgf .wgf-back[hidden] {
	display: inline-flex;
	visibility: hidden;
}

.wgf-back svg {
	width: 1rem;
	height: 1rem;
}

.wgf-counter {
	margin-left: auto;
	font-size: .82rem;
	font-weight: 600;
	color: var(--wgf-soft);
	font-variant-numeric: tabular-nums;
}

.wgf-progress {
	height: 4px;
	margin-bottom: 1.8rem;
	border-radius: 2px;
	background: rgba(184, 134, 11, .18);
	overflow: hidden;
}

.wgf-progress span {
	display: block;
	height: 100%;
	border-radius: 2px;
	background: var(--wgf-gold);
	transition: width .3s ease;
}

.wgf .wgf-question {
	display: block;
	width: 100%;
	margin: 0 0 1.5rem;
	padding: 0;
	font-family: "Poppins", sans-serif;
	font-size: clamp(1.35rem, 1.2vw + 1rem, 1.7rem);
	font-weight: 600;
	line-height: 1.25;
	color: #222;
	text-wrap: balance;
}

.wgf-options {
	display: grid;
	gap: .7rem;
}

.wgf .wgf-option {
	position: relative;
	display: block;
	margin: 0;
	cursor: pointer;
}

.wgf .wgf-option input {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.wgf .wgf-option span {
	position: relative;
	display: flex;
	align-items: center;
	gap: .55rem;
	width: 100%;
	min-height: 3.6rem;
	padding: .95rem 3.1rem .95rem 1.05rem;
	border: 1px solid var(--wgf-line);
	border-radius: 10px;
	background: #fff;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
	color: #222;
	transition: border-color .15s ease, background .15s ease;
}

.wgf .wgf-option span::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 1.05rem;
	width: 1.3rem;
	height: 1.3rem;
	margin-top: -.65rem;
	border: 1.5px solid rgba(37, 37, 37, .28);
	border-radius: 50%;
	background: #fff;
}

.wgf .wgf-option:hover span {
	border-color: var(--wgf-gold-ink);
}

.wgf .wgf-option input:checked + span {
	border-color: var(--wgf-gold);
	background: var(--wgf-tint);
	box-shadow: inset 0 0 0 1px var(--wgf-gold);
}

.wgf .wgf-option input:checked + span::after {
	border-color: var(--wgf-gold);
	background: var(--wgf-gold);
	box-shadow: inset 0 0 0 3px #fff;
}

.wgf .wgf-option input:focus-visible + span {
	outline: 2px solid var(--wgf-gold);
	outline-offset: 2px;
}

.wgf-survey__submit {
	margin-top: 1.4rem;
}

.wgf-survey .wgf-btn {
	min-height: 3.4rem;
	font-size: 1rem !important;
}

/* --- „Porozmawiajmy” i konsultacja ------------------------------------- */
.wgf-contact {
	display: grid;
	gap: 14px;
}

.wgf .wgf-field {
	margin: 0;
}

.wgf .wgf-field input[type="text"],
.wgf .wgf-field input[type="tel"],
.wgf .wgf-field textarea {
	display: block;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 12px 16px;
	border: .8px solid var(--wgf-field-line);
	border-radius: 14px;
	background: #fff;
	box-shadow: none;
	font: 400 16px/1.5 "Figtree", sans-serif;
	color: var(--wgf-text);
	outline: none;
	transition: border-color .15s ease;
}

.wgf .wgf-field textarea {
	min-height: 122px;
	resize: vertical;
}

.wgf .wgf-field ::placeholder {
	color: #A3A3A3;
	opacity: 1;
}

.wgf .wgf-field input:focus,
.wgf .wgf-field textarea:focus {
	border-color: var(--wgf-gold);
	box-shadow: 0 0 0 1px var(--wgf-gold);
}

.wgf [aria-invalid="true"] {
	border-color: #B42318 !important;
}

.wgf .wgf-label,
.wgf .wgf-times legend {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--wgf-text);
}

.wgf-times__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.wgf .wgf-time {
	position: relative;
	display: flex;
	margin: 0;
}

.wgf .wgf-time input {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.wgf .wgf-time span {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 58px;
	padding: 8px;
	border: 1px solid var(--wgf-field-line);
	border-radius: 14px;
	background: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--wgf-text);
	text-align: center;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
}

.wgf .wgf-time small {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	font-weight: 500;
	color: var(--wgf-soft);
}

.wgf .wgf-time:hover span {
	border-color: var(--wgf-gold);
}

.wgf .wgf-time input:checked + span {
	border-color: var(--wgf-gold);
	background: var(--wgf-tint);
	box-shadow: inset 0 0 0 1px var(--wgf-gold);
}

.wgf .wgf-time input:focus-visible + span {
	outline: 2px solid var(--wgf-gold);
	outline-offset: 2px;
}

.wgf .wgf-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--wgf-text);
	cursor: pointer;
}

.wgf .wgf-consent input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--wgf-gold);
	cursor: pointer;
}

.wgf .wgf-consent a {
	color: #000;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wgf-contact .wgf-error {
	margin: 0;
}

.wgf .wgf-success {
	margin: 0;
	padding: 14px 16px;
	border: 1px solid var(--wgf-gold);
	border-radius: 14px;
	background: var(--wgf-tint);
	font-weight: 600;
	color: var(--wgf-text);
}

/* --- nakładka podczas wysyłki ------------------------------------------- */
.wgf-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(255, 255, 255, .96);
	font-family: "Figtree", sans-serif;
	text-align: center;
}

.wgf-overlay[hidden] {
	display: none;
}

.wgf-spinner {
	width: 55px;
	height: 55px;
	margin-bottom: 20px;
	border: 6px solid #eee;
	border-top-color: #C9A227;
	border-radius: 50%;
	animation: wgf-spin .9s linear infinite;
}

.wgf-overlay__text {
	font-size: 22px;
	font-weight: 600;
	color: #222;
}

.wgf-overlay__sub {
	margin-top: 10px;
	color: #666;
}

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

@media (prefers-reduced-motion: reduce) {
	.wgf-spinner {
		animation-duration: 2.5s;
	}
}
