/*
 * Footer newsletter: CF7 form "Newsletter (footer)".
 * Same look as the old EduBlink Mailchimp widget: white field + teal button with arrow,
 * plus the terms checkbox underneath.
 */

.lh-newsletter p {
	margin: 0;
}

.lh-newsletter__row p {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: flex-start;
}

.lh-newsletter__row .wpcf7-form-control-wrap {
	flex: 1 1 180px;
	min-width: 0;
}

.wpcf7 .lh-newsletter input.lh-newsletter__email {
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 0 12px 0 30px;
	border: 0;
	border-radius: 5px;
	background: #fff;
	color: #181818;
	font-family: Poppins, sans-serif;
	font-size: 15px;
	box-shadow: none;
}

.wpcf7 .lh-newsletter input.lh-newsletter__email::placeholder {
	color: #6b6b6b;
	opacity: 1;
}

.wpcf7 .lh-newsletter input.lh-newsletter__email:focus {
	outline: 2px solid #1ab69d;
	outline-offset: 0;
}

/* Submit: CF7 renders an <input>, so the arrow icon sits on the wrapper. */
.lh-newsletter__btn {
	position: relative;
	flex: 0 0 auto;
	display: inline-flex;
}

.lh-newsletter__btn::after {
	content: "\e903";
	position: absolute;
	top: 50%;
	right: 28px;
	transform: translateY(-50%);
	font-family: icomoon;
	font-size: 11px;
	line-height: 1;
	color: #fff;
	pointer-events: none;
	transition: opacity 0.2s;
}

.wpcf7 .lh-newsletter input.lh-newsletter__submit {
	height: 50px;
	margin: 0;
	padding: 0 47px 0 28px;
	border: 0;
	border-radius: 5px;
	background: #1ab69d;
	color: #fff;
	font-family: Spartan, sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 50px;
	cursor: pointer;
	transition: background-color 0.3s, opacity 0.2s;
}

.wpcf7 .lh-newsletter input.lh-newsletter__submit:hover,
.wpcf7 .lh-newsletter input.lh-newsletter__submit:focus-visible {
	background: var(--edublink-gradient-primary, #1ab69d);
}

/* CF7 keeps the button disabled until the terms checkbox is ticked. */
.wpcf7 .lh-newsletter input.lh-newsletter__submit:disabled {
	background: #1ab69d;
	opacity: 0.5;
	cursor: not-allowed;
}

.lh-newsletter__btn:has(:disabled)::after {
	opacity: 0.5;
}

.lh-newsletter__btn .wpcf7-spinner {
	position: absolute;
	top: 50%;
	right: 22px;
	margin: -12px 0 0;
	background-color: rgba(255, 255, 255, 0.35);
}

.wpcf7 form.submitting .lh-newsletter__btn::after {
	opacity: 0;
}

/* Terms checkbox */
.lh-newsletter__terms {
	margin-top: 12px;
}

.lh-newsletter__terms .wpcf7-list-item {
	margin: 0;
}

.lh-newsletter__terms label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: #6b6b6b;
	cursor: pointer;
}

.lh-newsletter__terms input[type="checkbox"] {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin: 3px 0 0;
	accent-color: #1ab69d;
}

.lh-newsletter__terms .wpcf7-list-item-label::before,
.lh-newsletter__terms .wpcf7-list-item-label::after {
	content: none;
}

.lh-newsletter__terms a {
	color: #181818;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.lh-newsletter__terms a:hover {
	color: #1ab69d;
}

/* Validation and response messages */
.lh-newsletter .wpcf7-not-valid-tip {
	margin-top: 6px;
	font-size: 13px;
}

.wpcf7 form .lh-newsletter ~ .wpcf7-response-output {
	margin: 12px 0 0;
	padding: 8px 14px;
	border-width: 1px;
	border-radius: 5px;
	background: #fff;
	font-size: 14px;
	line-height: 1.5;
}
