/* Contact form popup (contact-form.js). Colours follow the protostar template (#0088cc). */
.fx-contact {
	--fx-accent: #0088cc;
	--fx-accent-dark: #006fa6;
	--fx-text: #333;
	--fx-muted: #6b7280;
	--fx-border: #c9d1d9;
	--fx-error: #b42318;
	--fx-ok: #067647;
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-family: 'Open Sans', Arial, sans-serif;
}
.fx-contact[hidden] { display: none; }
html.fx-contact-open { overflow: hidden; }

.fx-contact__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .55);
}

.fx-contact__box {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 460px;
	max-height: 100%;
	overflow-x: hidden;
	overflow-y: auto;
	margin: 0;
	padding: 24px 24px 20px;
	background: #fff;
	color: var(--fx-text);
	border-top: 4px solid var(--fx-accent);
	border-radius: 6px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}

.fx-contact__title {
	margin: 0 32px 16px 0;
	font-size: 20px;
	line-height: 1.3;
	color: var(--fx-text);
}
[dir="rtl"] .fx-contact__title { margin: 0 0 16px 32px; }

.fx-contact__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--fx-muted);
	font-size: 26px;
	line-height: 32px;
	cursor: pointer;
}
[dir="rtl"] .fx-contact__close { right: auto; left: 12px; }
.fx-contact__close:hover { color: var(--fx-text); }

.fx-contact__field {
	display: block;
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--fx-text);
}
.fx-contact__field span { color: var(--fx-error); }

/* !important beats the template's fixed widths and heights of inputs. */
.fx-contact__field input,
.fx-contact__field textarea {
	display: block;
	box-sizing: border-box !important;
	max-width: 100%;
	width: 100% !important;
	height: auto !important;
	margin: 4px 0 0 !important;
	padding: 8px 10px !important;
	border: 1px solid var(--fx-border);
	border-radius: 4px;
	background: #fff;
	color: var(--fx-text);
	font: 400 15px/1.4 'Open Sans', Arial, sans-serif;
	box-shadow: none;
}
.fx-contact__field textarea { resize: vertical; min-height: 110px; }
.fx-contact__field input:focus,
.fx-contact__field textarea:focus {
	border-color: var(--fx-accent);
	outline: 2px solid rgba(0, 136, 204, .25);
	outline-offset: 0;
}
[dir="rtl"] .fx-contact__field input[dir="ltr"] { text-align: right; }

.fx-contact__trap {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.fx-contact__status {
	min-height: 0;
	margin: 0 0 12px;
	font-size: 14px;
	line-height: 1.4;
}
.fx-contact__status:empty { display: none; }
.fx-contact__status--error { color: var(--fx-error); }
.fx-contact__status--ok { color: var(--fx-ok); font-weight: 600; }

.fx-contact__send {
	display: inline-block;
	padding: 9px 22px;
	border: 0;
	border-radius: 4px;
	background: var(--fx-accent);
	color: #fff;
	font: 600 15px/1.4 'Open Sans', Arial, sans-serif;
	cursor: pointer;
}
.fx-contact__send:hover { background: var(--fx-accent-dark); }
.fx-contact__send:disabled { opacity: .6; cursor: default; }
.fx-contact__send:focus-visible,
.fx-contact__close:focus-visible { outline: 2px solid var(--fx-accent); outline-offset: 2px; }

/* The footer "Send Message" button that opens the popup. !important beats its inline styles
   and the template's .btn gradient. */
.static-mail-btn {
	display: inline-flex !important;
	align-items: center;
	gap: 10px;
	margin: 20px 0 !important;
	padding: 12px 26px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #02adea linear-gradient(135deg, #02adea, #0088cc) !important;
	color: #fff !important;
	font: 600 15px/1.2 'Open Sans', Arial, sans-serif !important;
	letter-spacing: .02em;
	text-shadow: none !important;
	text-decoration: none !important;
	box-shadow: 0 6px 18px rgba(0, 136, 204, .35) !important;
	transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.static-mail-btn::before {
	content: '';
	width: 18px;
	height: 18px;
	flex: none;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.static-mail-btn:hover,
.static-mail-btn:focus {
	color: #fff !important;
	filter: brightness(1.08);
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(0, 136, 204, .45) !important;
}
.static-mail-btn:active { transform: translateY(0); }
.static-mail-btn:focus-visible { outline: 3px solid rgba(255, 255, 255, .8); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
	.static-mail-btn { transition: none; }
	.static-mail-btn:hover, .static-mail-btn:focus { transform: none; }
}
