/* Finea Forms - styles for the [finea_form] shortcode. Matches the "10 Nowa strona TSL Spedycja" mockup. */

.finea-form {
	font-family: "Titillium Web", sans-serif;
	text-align: left;
}

.finea-form-alert {
	display: none;
	margin: 0 0 20px;
	padding: 14px 18px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
}
.finea-form-alert.is-success {
	display: block;
	background: #e6f7f4;
	color: #0f7a67;
}
.finea-form-alert.is-error {
	display: block;
	background: #fdecea;
	color: #c0392b;
}

/* After a successful submit: keep only the success message, hide the rest of the form. */
.finea-form.finea-form-submitted .finea-form-fields,
.finea-form.finea-form-submitted .finea-form-submit-row,
.finea-form.finea-form-submitted .finea-form-consents {
	display: none;
}
.finea-form.finea-form-submitted .finea-form-alert.is-success {
	margin-bottom: 0;
}

.finea-form-fields {
	display: flex;
	gap: 32px;
	margin: 0 0 32px;
}
.finea-form-field {
	flex: 1;
	min-width: 0;
}
.finea-form-input {
	width: 100%;
	border: none;
	border-bottom: 2px solid #3bbfad;
	background: transparent;
	padding: 8px 2px;
	font-size: 16px;
	font-family: inherit;
	color: #111c4e;
	border-radius: 0;
}
.finea-form-input::placeholder {
	color: #8a94ad;
}
.finea-form-input:focus {
	outline: none;
	border-bottom-color: #111c4e;
}
.finea-form-input.finea-form-invalid {
	border-bottom-color: #c0392b;
}

.finea-form-error {
	display: block;
	margin-top: 4px;
	color: #c0392b;
	font-size: 12px;
	line-height: 1.4;
}
.finea-form-error:empty {
	margin-top: 0;
}
.finea-form-error-consents {
	/* Explicit row: with grid-auto-flow:column, a full-width item without a fixed
	   row would grow the grid a 3rd COLUMN instead of a 3rd row (auto-flow grows
	   tracks along its own axis). Row 3 = below the 2x2 desktop consents grid. */
	grid-column: 1 / -1;
	grid-row: 3;
}

.finea-form-submit-row {
	text-align: center;
	margin: 0 0 28px;
}
.finea-form-submit {
	background: #3bbfad;
	color: #fff;
	border: none;
	border-radius: 40px;
	padding: 16px 48px;
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	font-family: inherit;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.finea-form-submit:hover {
	background: #2fa694;
}
.finea-form-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.finea-form-consents {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: repeat(2, auto);
	grid-auto-flow: column;
	gap: 12px 24px;
}
.finea-form-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	line-height: 1.5;
	color: #333;
	cursor: pointer;
}
.finea-form-consent input[type="checkbox"] {
	margin-top: 3px;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	accent-color: #3bbfad;
}
.finea-form-consent.finea-form-invalid {
	color: #c0392b;
}
.finea-form-consent-all span {
	font-weight: 700;
	color: #111c4e;
}

.finea-form-consent-link {
	position: relative;
	text-decoration: underline;
	cursor: pointer;
}
.finea-form-consent-tooltip {
	display: none;
	position: absolute;
	bottom: 100%;
	left: 0;
	z-index: 10;
	width: 280px;
	max-width: 80vw;
	margin-bottom: 8px;
	padding: 12px 14px;
	border-radius: 8px;
	background: #111c4e;
	color: #fff;
	font-size: 12px;
	line-height: 1.5;
	font-weight: 400;
	text-decoration: none;
}
.finea-form-consent-link.is-open .finea-form-consent-tooltip {
	display: block;
}

@media (max-width: 768px) {
	.finea-form-fields {
		flex-direction: column;
		gap: 16px;
	}
	.finea-form-consents {
		grid-template-columns: 1fr;
		grid-auto-flow: row;
	}
	.finea-form-error-consents {
		grid-row: 5;
	}
}
