/* HSD Tools – Mailing List Box (small, non-blocking sign-up card) */

.hsd-nl {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9990;
	width: 340px;
	max-width: calc(100vw - 20px);
	box-sizing: border-box;
	padding: 18px 18px 16px;
	background: #ffffff;
	border: 1px solid #dfe3e6;
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(18, 56, 90, 0.18);
	color: #222529;
	font-size: 13px;
	line-height: 1.45;
	text-align: left;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .25s ease, transform .25s ease;
}
.hsd-nl[hidden] { display: none !important; }
.hsd-nl.is-open { opacity: 1; transform: none; }

.hsd-nl__head { display: flex; align-items: center; gap: 10px; }
.hsd-nl__icon {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #e3f1f7;
	color: #1a7fa0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.hsd-nl__title { flex: 1 1 auto; font-size: 15px; font-weight: 600; color: #222529; }
.hsd-nl__close {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	margin: -8px -8px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #5d6266;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: none;
}
.hsd-nl__close:hover, .hsd-nl__close:focus-visible { background: #f0f2f4; color: #222529; }
.hsd-nl__text { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: #4a4e52; }
.hsd-nl__thanks { margin: 10px 0 2px; font-size: 13px; font-weight: 600; color: #1f6b33; }

/* Contact Form 7 inside the box */
.hsd-nl__form { margin-top: 12px; }
.hsd-nl__form .wpcf7 { margin: 0; }
.hsd-nl__form form { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.hsd-nl__form form > p,
.hsd-nl__form form > div:not(.wpcf7-response-output):not(.cf-turnstile):not(.cf-turnstile-br) {
	display: flex;
	gap: 8px;
	width: 100%;
	margin: 0 !important;
	padding: 0;
}
.hsd-nl__form br { display: none; }
.hsd-nl__form .wpcf7-form-control-wrap { flex: 1 1 auto; min-width: 0; display: block; }
.hsd-nl__form input[type="email"],
.hsd-nl__form input[type="text"] {
	width: 100% !important;
	height: 42px;
	box-sizing: border-box;
	margin: 0 !important;
	padding: 0 12px !important;
	border: 1px solid #c9ced2 !important;
	border-radius: 4px !important;
	background: #ffffff !important;
	font-size: 13.5px !important;
	color: #222529 !important;
	box-shadow: none !important;
}
.hsd-nl__form input[type="submit"],
.hsd-nl__form button[type="submit"] {
	flex: 0 0 auto;
	height: 42px;
	margin: 0 !important;
	padding: 0 16px !important;
	border: 0 !important;
	border-radius: 4px !important;
	background: #1a7fa0 !important;
	color: #ffffff !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 42px !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	cursor: pointer;
	width: auto !important;
}
.hsd-nl__form input[type="submit"]:hover,
.hsd-nl__form button[type="submit"]:hover { background: #13627c !important; }
/* The old pop-up's "Don't show this popup anymore" tick box isn't needed here */
.hsd-nl__form [data-name="wysija_donot_popup"],
.hsd-nl__form .wysija_donot_popup,
.hsd-nl__form label:has(input[name^="wysija_donot_popup"]) { display: none !important; }
.hsd-nl__form .wpcf7-spinner { position: absolute; right: 18px; bottom: 18px; margin: 0; }
.hsd-nl__form .wpcf7-response-output {
	width: 100%;
	margin: 4px 0 0 !important;
	padding: 6px 10px !important;
	font-size: 12px;
	border-width: 1px !important;
	border-radius: 4px;
}
.hsd-nl__form .wpcf7-not-valid-tip { font-size: 12px; margin-top: 4px; }
.hsd-nl__form .cf-turnstile { width: 100%; }

/* Keep Porto's back-to-top button out of the way while the box is open */
body.hsd-nl-open #topcontrol { opacity: 0 !important; pointer-events: none !important; }

@media (max-width: 767px) {
	.hsd-nl {
		left: 10px;
		right: 10px;
		bottom: 10px;
		width: auto;
		max-width: none;
		padding: 12px 12px 12px 14px;
	}
	.hsd-nl__icon, .hsd-nl__text { display: none; }
	.hsd-nl__title { font-size: 14px; }
	.hsd-nl__close { width: 44px; height: 36px; margin: -6px -6px -6px 0; }
	.hsd-nl__form { margin-top: 8px; }
	.hsd-nl__form input[type="email"],
	.hsd-nl__form input[type="text"] { height: 44px; font-size: 14px !important; }
	.hsd-nl__form input[type="submit"],
	.hsd-nl__form button[type="submit"] { height: 44px; line-height: 44px !important; padding: 0 14px !important; }
}

@media (prefers-reduced-motion: reduce) {
	.hsd-nl { transition: none; transform: none; }
}

/* Porto / CF7 markup used by the "Newsletter Popup" form: email + button on one line, Turnstile below */
.hsd-nl__form form > .d-flex { flex-wrap: wrap; justify-content: flex-start !important; align-items: flex-start !important; }
.hsd-nl__form .wysija-paragraph { flex: 1 1 0; min-width: 0; margin: 0 !important; }
.hsd-nl__form .d-flex > button,
.hsd-nl__form .d-flex > input[type="submit"] { order: 2; }
.hsd-nl__form .d-flex > br { display: none; }
.hsd-nl__form .cf7-cf-turnstile { order: 3; flex: 0 0 100%; margin: 0 !important; }
.hsd-nl__form .cf7-cf-turnstile .cf-turnstile { margin: 0 !important; }
.hsd-nl__form form > p:has(.wysija-checkbox) { display: none !important; }
