/**
 * Shared newsletter form component used by the general site and landing page.
 */

body.piso2-landing-newsletter-page .piso2-landing-newsletter__panel {
	width: min(514px, calc(100vw - 45px));
}

body.piso2-child-theme .piso2-newsletter-signup,
body.piso2-landing-newsletter-page .piso2-newsletter-signup {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(34px, 2.396vw, 46px);
}

body.piso2-child-theme .piso2-newsletter-signup .piso2-newsletter-signup__field,
body.piso2-landing-newsletter-page .piso2-newsletter-signup .piso2-newsletter-signup__field {
	display: grid;
	gap: clamp(8px, 0.521vw, 10px);
	margin: 0;
}

body.piso2-child-theme .piso2-newsletter-signup .piso2-newsletter-signup__field label,
body.piso2-landing-newsletter-page .piso2-newsletter-signup .piso2-newsletter-signup__field label {
	display: block;
	font-size: clamp(15px, 0.885vw, 17px);
	font-weight: 700;
	line-height: 1;
}

body.piso2-child-theme .piso2-newsletter-signup .piso2-newsletter-signup__field input,
body.piso2-landing-newsletter-page .piso2-newsletter-signup .piso2-newsletter-signup__field input {
	display: block;
	width: 100%;
	height: 50px;
	margin: 0;
	border: 1px solid #a5a5a5;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #000000;
	font-family: "Montserrat", Arial, sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
	padding: 0 12px;
}

.piso2-newsletter-signup__date-control {
	position: relative;
	display: block;
	width: 100%;
	height: 50px;
}

body .piso2-newsletter-signup .piso2-newsletter-signup__date-control.is-enhanced input[type="date"] {
	position: relative;
	z-index: 2;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

body .piso2-newsletter-signup .piso2-newsletter-signup__date-control.is-enhanced input[type="date"]::-webkit-datetime-edit {
	opacity: 0;
}

body .piso2-newsletter-signup .piso2-newsletter-signup__date-control.is-enhanced input[type="date"]::-webkit-calendar-picker-indicator {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
	opacity: 0;
}

body .piso2-newsletter-signup .piso2-newsletter-signup__date-display {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 12px;
	z-index: 1;
	display: flex;
	align-items: center;
	font-size: 16px;
	font-weight: 400;
	line-height: normal;
	transform: none;
}

body .piso2-newsletter-signup .piso2-newsletter-signup__date-control.is-enhanced:has(input:valid) .piso2-newsletter-signup__date-display {
	z-index: 3;
}

.piso2-newsletter-signup__turnstile:empty {
	display: none;
}

.piso2-newsletter-signup__turnstile {
	max-width: 100%;
	min-height: 0;
}

.piso2-turnstile.is-interactive {
	min-height: 65px;
}

.piso2-turnstile .cf-turnstile {
	width: 100%;
	max-width: 100%;
}

body.piso2-child-theme .piso2-newsletter-signup button,
body.piso2-landing-newsletter-page .piso2-newsletter-signup button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	justify-self: start;
	width: 78px;
	height: 50px;
	min-height: 50px;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: #000000;
	color: #ffffff;
	cursor: pointer;
	font-family: "Montserrat", Arial, sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	padding: 0;
}

body .piso2-newsletter-signup button:disabled {
	cursor: wait;
	opacity: 0.65;
}

/* Shared post-submission presentation used by both newsletter pages. */
.piso2-newsletter-response {
	display: block;
	width: 100%;
}

body.piso2-child-theme .piso2-newsletter-response:focus-visible,
body.piso2-landing-newsletter-page .piso2-newsletter-response:focus-visible {
	outline: 0;
}

.piso2-newsletter-response__title-line,
.piso2-newsletter-response__message-line {
	display: block;
}

.piso2-newsletter-response__title-variant--mobile,
.piso2-newsletter-response__message-variant--mobile {
	display: none;
}

.piso2-newsletter-response__copy a {
	color: #000000;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.piso2-form-feedback {
	--piso2-feedback-color: #147a45;
	--piso2-feedback-background: #edf8f1;

	position: static;
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr);
	align-items: start;
	width: 100%;
	max-width: 100%;
	margin: 0;
	border: 1px solid var(--piso2-feedback-color);
	border-left-width: 4px;
	border-radius: 0;
	background: var(--piso2-feedback-background);
	box-shadow: none;
	color: #000000;
	column-gap: 12px;
	padding: 16px 18px;
}

.piso2-form-feedback.is-error {
	--piso2-feedback-color: #a30d21;
	--piso2-feedback-background: #fff1f3;
}

.piso2-form-feedback.is-success {
	--piso2-feedback-color: #147a45;
	--piso2-feedback-background: #edf8f1;
}

.piso2-form-feedback[hidden],
.piso2-field-error[hidden] {
	display: none;
}

body.piso2-child-theme .piso2-form-feedback:focus-visible,
body.piso2-landing-newsletter-page .piso2-form-feedback:focus-visible {
	outline: 0;
}

.piso2-form-feedback__icon {
	position: relative;
	display: block;
	width: 24px;
	height: 24px;
	border: 2px solid var(--piso2-feedback-color);
	border-radius: 50%;
	background: var(--piso2-feedback-color);
	color: #ffffff;
}

.piso2-form-feedback__icon::before,
.piso2-form-feedback__icon::after {
	position: absolute;
	content: "";
}

.piso2-form-feedback.is-success .piso2-form-feedback__icon::before {
	top: 6px;
	left: 6px;
	width: 9px;
	height: 5px;
	border-bottom: 2px solid currentcolor;
	border-left: 2px solid currentcolor;
	transform: rotate(-45deg);
}

.piso2-form-feedback.is-error .piso2-form-feedback__icon::before,
.piso2-form-feedback.is-error .piso2-form-feedback__icon::after {
	top: 9px;
	left: 5px;
	width: 10px;
	height: 2px;
	background: currentcolor;
}

.piso2-form-feedback.is-error .piso2-form-feedback__icon::before {
	transform: rotate(45deg);
}

.piso2-form-feedback.is-error .piso2-form-feedback__icon::after {
	transform: rotate(-45deg);
}

.piso2-form-feedback__copy {
	display: grid;
	min-width: 0;
	gap: 6px;
}

.piso2-form-feedback__title,
.piso2-form-feedback__message {
	margin: 0;
	color: inherit;
	font-family: "Montserrat", Arial, sans-serif;
}

.piso2-form-feedback__title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}

.piso2-form-feedback__message {
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
}

.piso2-field-error {
	display: block;
	margin: 0;
	color: #a30d21;
	font-family: "Montserrat", Arial, sans-serif;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

body :where(.piso2-contact-form, .piso2-newsletter-signup) :where(input, textarea)[aria-invalid="true"] {
	border-color: #a30d21;
	border-width: 2px;
}

body.piso2-child-theme .piso2-contact-form :where(input, textarea):focus,
body.piso2-child-theme .piso2-contact-form :where(input, textarea):focus-visible,
body.piso2-child-theme .piso2-newsletter-signup .piso2-newsletter-signup__field input:focus,
body.piso2-child-theme .piso2-newsletter-signup .piso2-newsletter-signup__field input:focus-visible,
body.piso2-landing-newsletter-page .piso2-newsletter-signup .piso2-newsletter-signup__field input:focus,
body.piso2-landing-newsletter-page .piso2-newsletter-signup .piso2-newsletter-signup__field input:focus-visible {
	border-color: #6f6f6f;
	outline: 0;
	box-shadow: none;
}

body :where(.piso2-contact-form, .piso2-newsletter-signup) :where(input, textarea)[aria-invalid="true"]:focus {
	border-color: #8a0b1b;
	outline: 0;
	box-shadow: none;
}

body.piso2-landing-newsletter-page .piso2-honeypot,
.piso2-newsletter-signup .piso2-honeypot {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

@media (max-width: 767px) {
	.piso2-turnstile.is-interactive {
		width: 100%;
	}

	.piso2-form-feedback {
		padding: 16px;
	}

	body.piso2-child-theme .piso2-newsletter-signup,
	body.piso2-landing-newsletter-page .piso2-newsletter-signup {
		gap: 34px;
	}

	body.piso2-child-theme .piso2-newsletter-signup button,
	body.piso2-landing-newsletter-page .piso2-newsletter-signup button {
		width: 78px;
		height: 50px;
		min-height: 50px;
		font-size: 16px;
	}
}

@media (max-width: 344px) {
	.piso2-turnstile.is-interactive {
		width: 300px;
		max-width: 300px;
		justify-self: center;
	}
}
