/* Floating contact widget.
   Every selector here is scoped to the widget. An earlier version styled bare
   input[type='text'], textarea and button[type='submit'], which was harmless
   while the stylesheet only loaded on four pages but would restyle every form
   on the site now that it loads on all seventeen. */

.contact-btn {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background-color: var(--accent-color);
	border: none;
	border-radius: 50%;
	width: 60px;
	height: 60px;
	color: white;
	cursor: pointer;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	z-index: var(--z-contact-button);
	transition: background-color 0.3s ease, transform 0.2s ease;
}

.contact-btn:hover {
	background-color: #0052a3;
	transform: scale(1.05);
}

.contact-btn:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--accent-color);
}

.contact-btn .icon {
	width: 26px;
	height: 26px;
}

.contact-form-container {
	position: fixed;
	right: -400px;
	bottom: 20px;
	width: 300px;
	height: min(440px, 100%);
	background-color: white;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
	z-index: var(--z-contact-panel);
	padding: 24px;
	padding-bottom: 5rem;
	font-family: 'Inter', sans-serif;
	color: var(--text-primary);
	overflow-y: auto;
	box-sizing: border-box;

	/* visibility (not just the off-screen offset) keeps the closed form out of
	   the tab order — otherwise keyboard users tab into invisible fields.
	   The delay lets the slide-out finish before it disappears. */
	visibility: hidden;
	transition: right 0.3s ease-in-out, visibility 0s linear 0.3s;
}

.contact-form-container.show {
	right: 10px;
	visibility: visible;
	transition: right 0.3s ease-in-out, visibility 0s linear 0s;
}

.contact-form-container h2 {
	margin-top: 0;
	color: var(--text-primary);
	font-size: 24px;
	margin-bottom: 20px;
	text-align: left;
}

.contact-form-container input[type='text'],
.contact-form-container input[type='email'],
.contact-form-container textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 12px;
	margin-bottom: 16px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-family: 'Inter', sans-serif;
	transition: border-color 0.3s ease;
}

.contact-form-container input[type='text']:focus,
.contact-form-container input[type='email']:focus,
.contact-form-container textarea:focus {
	outline: none;
	border-color: var(--accent-color);
}

.contact-form-container textarea {
	height: 100px;
	resize: vertical;
}

.contact-form-container button[type='submit'] {
	width: 100%;
	padding: 12px;
	background-color: var(--accent-color);
	font-weight: 600;
	color: white;
	border: none;
	text-transform: uppercase;
	border-radius: 4px;
	cursor: pointer;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	transition: background-color 0.3s ease;
}

.contact-form-container button[type='submit']:hover {
	background-color: #0052a3;
}

.contact-form-container button[type='submit'][disabled] {
	background-color: #8fb8e0;
	cursor: default;
}

.contact-form-status {
	margin: 14px 0 0;
	font-size: 14px;
	line-height: 1.5;
	min-height: 1px;
}

.contact-form-status.is-success {
	color: #1a7f37;
}

.contact-form-status.is-error {
	color: #b42318;
}

/* Available to any page: label text for screen readers without visual weight. */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
