/**
 * Page Builder — Newsletter section (estilos CF7).
 */

.cortex-pb-newsletter-section__form-wrap .wpcf7-form {
	margin: 0;
}

.cortex-pb-newsletter-section__form-wrap .wpcf7-form br,
.cortex-pb-newsletter-section__form-wrap .cortex-pb-newsletter-section__form br {
	display: none;
}

/* Wrapper interno: linha no desktop */
.cortex-pb-newsletter-section__form-wrap .cortex-pb-newsletter-section__form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cortex-pb-newsletter-section__form-wrap .cortex-pb-newsletter-section__form > p {
	margin: 0;
}

@media (min-width: 768px) {
	.cortex-pb-newsletter-section__form-wrap .cortex-pb-newsletter-section__form {
		flex-direction: row;
		align-items: stretch;
		width: fit-content;
		max-width: 100%;
	}

	/* Dois <p> separados (email | submit) */
	.cortex-pb-newsletter-section__form-wrap .cortex-pb-newsletter-section__form > p:first-child {
		flex: 0 1 300px;
		min-width: 0;
		max-width: 300px;
	}

	.cortex-pb-newsletter-section__form-wrap .cortex-pb-newsletter-section__form > p:last-child:not(:only-child) {
		flex: 0 0 auto;
	}

	/* Um único <p> com email + submit */
	.cortex-pb-newsletter-section__form-wrap .cortex-pb-newsletter-section__form > p:only-child {
		display: flex;
		flex: 0 1 auto;
		flex-direction: row;
		align-items: stretch;
		gap: 8px;
		min-width: 0;
		width: fit-content;
		max-width: 100%;
	}

	.cortex-pb-newsletter-section__form-wrap .cortex-pb-newsletter-section__form > p:only-child .wpcf7-form-control-wrap {
		flex: 0 1 300px;
		min-width: 0;
		max-width: 300px;
	}

	.cortex-pb-newsletter-section__form-wrap .cortex-pb-newsletter-section__form > p:only-child input[type="submit"] {
		flex: 0 0 auto;
		width: auto;
	}
}

.cortex-pb-newsletter-section__form-wrap .wpcf7-form-control-wrap {
	display: block;
	width: 100%;
}

.cortex-pb-newsletter-section__form-wrap .wpcf7-form-control.wpcf7-email {
	box-sizing: border-box;
	width: 100%;
	height: 48px;
	padding: 0 14px;
	border: 1.5px solid rgba(255, 255, 255, 0.2);
	border-radius: 4px;
	background-color: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 13px;
	font-family: inherit;
	outline: none;
	transition: border-color 160ms ease, background-color 160ms ease;
}

.cortex-pb-newsletter-section__form-wrap .wpcf7-form-control.wpcf7-email::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.cortex-pb-newsletter-section__form-wrap .wpcf7-form-control.wpcf7-email:focus {
	border-color: rgba(255, 255, 255, 0.5);
	background-color: rgba(255, 255, 255, 0.15);
}

.cortex-pb-newsletter-section__form-wrap .wpcf7-form input[type="submit"],
.cortex-pb-newsletter-section__form-wrap .cortex-pb-newsletter-section__submit {
	box-sizing: border-box;
	height: 48px;
	padding: 0 18px;
	border: 0;
	border-radius: 4px;
	background-color: var(--cortex-primary);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	font-family: inherit;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 160ms ease, opacity 160ms ease;
}

@media (max-width: 767px) {
	.cortex-pb-newsletter-section__form-wrap .wpcf7-form input[type="submit"],
	.cortex-pb-newsletter-section__form-wrap .cortex-pb-newsletter-section__submit {
		width: 100%;
	}
}

.cortex-pb-newsletter-section__form-wrap .wpcf7-form input[type="submit"]:hover,
.cortex-pb-newsletter-section__form-wrap .cortex-pb-newsletter-section__submit:hover {
	opacity: 0.92;
}

.cortex-pb-newsletter-section__form-wrap .wpcf7-not-valid-tip {
	margin-top: 4px;
	font-size: 12px;
	color: #fecaca;
}

.cortex-pb-newsletter-section__form-wrap .wpcf7-response-output {
	margin: 12px 0 0;
	padding: 10px 12px;
	border-radius: 4px;
	font-size: 13px;
	color: #fff;
}

.cortex-pb-newsletter-section__form-wrap .wpcf7 form.invalid .wpcf7-response-output,
.cortex-pb-newsletter-section__form-wrap .wpcf7 form.unaccepted .wpcf7-response-output,
.cortex-pb-newsletter-section__form-wrap .wpcf7 form.payment-required .wpcf7-response-output {
	border-color: rgba(254, 202, 202, 0.8);
	background-color: rgba(127, 29, 29, 0.35);
}

.cortex-pb-newsletter-section__form-wrap .wpcf7 form.sent .wpcf7-response-output {
	border-color: rgba(167, 243, 208, 0.8);
	background-color: rgba(6, 78, 59, 0.35);
}

.cortex-pb-newsletter-section__form-wrap .wpcf7-spinner {
	display: none;
}
