/**
 * Formulario de newsletter de MailPoet (footer).
 */

/* Formulario de newsletter (MailPoet). MailPoet pone estilos en línea, por eso los !important. */
.rianca-newsletter .mailpoet_form {
	padding: 0 !important;
}

.rianca-newsletter .mailpoet_paragraph {
	margin-bottom: 0.75rem;
}

.rianca-newsletter .mailpoet_paragraph.last,
.rianca-newsletter .mailpoet_paragraph:last-of-type {
	margin-bottom: 0;
}

.rianca-newsletter input.mailpoet_text,
.rianca-newsletter input.mailpoet_submit {
	box-sizing: border-box;
	width: 100% !important;
	padding: 0.625rem 1rem !important;
	border-radius: var(--wp--custom--radius--lg);
	font: inherit;
	/* MailPoet pone Arial en el párrafo que envuelve el campo: no basta con heredar. */
	font-family: var(--wp--preset--font-family--sans);
	transition: all 0.15s;
}

.rianca-newsletter input.mailpoet_text {
	border: 1px solid rgb(255 255 255 / 0.2);
	background-color: rgb(255 255 255 / 0.1);
	color: var(--wp--preset--color--base);
}

.rianca-newsletter input.mailpoet_text::placeholder {
	color: #9ca3af;
}

.rianca-newsletter input.mailpoet_text:focus {
	outline: none;
	border-color: transparent;
	box-shadow: 0 0 0 2px rgb(255 255 255 / 0.4);
}

/*
 * Botón con el icono de "enviar" a la derecha del texto. El padding derecho extra (hueco + icono)
 * desplaza el texto a la izquierda para que texto e icono queden centrados juntos.
 */
.rianca-newsletter input.mailpoet_submit {
	padding-right: 2.5rem !important;
	border: 0 !important;
	background: var(--wp--preset--color--base) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23003566' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z'/><path d='m21.854 2.147-10.94 10.939'/></svg>") no-repeat calc(50% + 3rem) center / 1rem;
	color: var(--wp--preset--color--primary);
	font-weight: 600;
	cursor: pointer;
}

.rianca-newsletter input.mailpoet_submit:hover {
	background-color: #f3f4f6;
	background-position: calc(50% + 3.25rem) center;
}

.rianca-newsletter .mailpoet_message {
	padding: 0 !important;
	font-size: var(--wp--preset--font-size--sm);
}

/*
 * Mensaje de éxito: MailPoet oculta los campos (visibility) y centra el mensaje con
 * left/top 50% + transform, lo que lo deja estrecho. Lo convertimos en un aviso
 * que ocupa exactamente el hueco del campo y el botón.
 */
.rianca-newsletter .mailpoet_form.mailpoet_form_successfully_send .mailpoet_validate_success {
	position: absolute;
	inset: 0;
	transform: none;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	box-sizing: border-box;
	margin: 0;
	padding: 0.75rem 1rem;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--whatsapp) 55%, transparent);
	border-radius: var(--wp--custom--radius--lg);
	background-color: color-mix(in srgb, var(--wp--preset--color--whatsapp) 18%, transparent);
	color: var(--wp--preset--color--base) !important;
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1.4;
	text-align: left;
}

.rianca-newsletter .mailpoet_form.mailpoet_form_successfully_send .mailpoet_validate_success::before {
	content: "";
	flex-shrink: 0;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 9999px;
	background: var(--wp--preset--color--whatsapp) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>") no-repeat center / 0.875rem;
}

/* Errores (del servidor y de validación del campo). */
.rianca-newsletter .mailpoet_validate_error {
	margin: 0.75rem 0 0;
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1.4;
}

.rianca-newsletter .parsley-errors-list {
	margin: 0.375rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	line-height: 1.4;
}

.rianca-newsletter-consent {
	font-size: 0.75rem !important;
	color: #9ca3af;
}

.rianca-footer .rianca-newsletter-consent a {
	text-decoration: underline;
}
