/* =============================================================================
   Contact page
   ============================================================================= */

*,
*::before,
*::after {
	box-sizing: border-box;
}

/* body stays dark so the parallax footer renders against a black background */
body {
	background: #000;
	color: #fff;
	overflow-x: clip;
}

.contact-page {
	background: #fff;
	color: #0f1117;
	min-height: calc(100svh - var(--header-h));
	padding: clamp(4rem, 8svh, 7rem) clamp(1.5rem, 6vw, 6rem);
}

.contact-layout {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 1.5fr;
	gap: clamp(3rem, 6vw, 8rem);
	align-items: start;
}

/* ── Left: intro ─────────────────────────────────────────── */

.contact-intro {
	position: sticky;
	top: calc(var(--header-h) + 2rem);
	min-width: 0;
}

.contact-tagline {
	padding-top: 1.5rem;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: #fc694c;
	margin-bottom: 1.25rem;
}

.contact-heading {
	font-family: 'Inter', sans-serif;
	font-size: clamp(3rem, 6vw, 6rem);
	font-weight: 500;
	letter-spacing: -0.04em;
	line-height: 1;
	color: #0f1117;
	margin-bottom: 1.75rem;
}

.contact-desc {
	font-family: 'DM Sans', sans-serif;
	font-size: clamp(0.9rem, 1.1vw, 1rem);
	line-height: 1.75;
	color: rgba(0, 0, 0, 0.8);
}

.contact-desc-secondary {
	margin-top: 0.75rem;
}

.contact-desc-note {
	margin-top: 1.25rem;
	font-size: 0.82rem;
	font-weight: 700;
	color: rgba(0, 0, 0, 0.45);
}

.contact-desc-urgent {
	margin-top: 0.75rem;
	font-size: 0.85rem;
	color: rgba(0, 0, 0, 0.75);
}

.obf-email::before {
	content: attr(data-u) " [@] " attr(data-d) " [.] " attr(data-t);
	font-weight: 600;
	letter-spacing: 0.01em;
}

.required {
	color: #fc694c;
}

.field-optional {
	font-size: 0.78rem;
	color: rgba(0, 0, 0, 0.4);
	font-weight: 400;
}

/* ── Form structure ──────────────────────────────────────── */

.contact-form {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	min-width: 0;
	position: relative; /* contains the honeypot's position: absolute */
}

/* Honeypot */
.contact-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

/* Fieldset sections */
.form-section {
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 1rem;
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	min-width: 0; /* override browser UA: fieldset defaults to min-width: min-content */
	width: 100%;
}

.form-section-legend {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.92rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #0f1117;
	padding: 0 0.5rem;
	margin-bottom: 0.25rem;
}

.legend-note {
	font-size: 0.7rem;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: rgba(0, 0, 0, 0.4);
}

/* Form group */
.form-group {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.form-group label {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.83rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: #0f1117;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.5rem;
}

/* Inputs, selects, textareas */
.form-group input:not([type='checkbox']):not([type='number']),
.form-group select,
.form-group textarea {
	background: #f7f8fa;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 0.6rem;
	color: #0f1117;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.95rem;
	padding: 0.8rem 1rem;
	width: 100%;
	box-sizing: border-box;
	outline: none;
	transition:
		border-color 0.2s ease,
		background 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
	color: rgba(0, 0, 0, 0.35);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
	border-color: #fc694c;
	background: #fff;
}

.form-group input[aria-invalid='true'],
.form-group textarea[aria-invalid='true'] {
	border-color: rgba(239, 68, 68, 0.6);
}

.form-group textarea {
	resize: vertical;
	min-height: 110px;
	line-height: 1.6;
}

/* Inline field errors */
.field-error {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.78rem;
	color: #dc2626;
	line-height: 1.4;
}

.field-error[hidden] {
	display: none;
}

/* Char counter */
.char-count {
	font-size: 0.72rem;
	color: rgba(0, 0, 0, 0.3);
	font-weight: 400;
	letter-spacing: 0;
}

/* Custom select arrow */
.select-wrapper {
	position: relative;
}

.select-wrapper::after {
	content: '';
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid rgba(0, 0, 0, 0.4);
	pointer-events: none;
}

.form-group select {
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.form-group select option {
	background: #fff;
	color: #0f1117;
}

/* ── Role checkboxes ─────────────────────────────────────── */

.role-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

.role-card {
	cursor: pointer;
	display: block;
}

.role-card input[type='checkbox'] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.role-card-inner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.9rem 1rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 0.6rem;
	background: #f7f8fa;
	transition:
		border-color 0.2s ease,
		background 0.2s ease;
}

.role-card:hover .role-card-inner {
	border-color: rgba(0, 0, 0, 0.25);
	background: #eff0f2;
}

.role-card input:checked + .role-card-inner {
	border-color: #fc694c;
	background: rgba(252, 105, 76, 0.08);
}

.role-card-check {
	width: 1.25rem;
	height: 1.25rem;
	flex-shrink: 0;
	border: 1.5px solid rgba(0, 0, 0, 0.25);
	border-radius: 0.3rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition:
		border-color 0.2s ease,
		background 0.2s ease;

	svg {
		opacity: 0;
		transition: opacity 0.15s ease;
	}
}

.role-card input:checked + .role-card-inner .role-card-check {
	border-color: #fc694c;
	background: #fc694c;
	svg {
		opacity: 1;
	}
}

.role-card-label {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.88rem;
	font-weight: 500;
	color: #0f1117;
	line-height: 1.3;
}

.role-card input:checked + .role-card-inner .role-card-label {
	color: #0f1117;
}

/* ── Date inputs ─────────────────────────────────────────── */

.date-input-wrapper {
	position: relative;
}

.date-input-wrapper input {
	padding-right: 2.75rem;
	cursor: pointer;
}

.date-icon {
	position: absolute;
	right: 0.9rem;
	top: 50%;
	transform: translateY(-50%);
	color: rgba(0, 0, 0, 0.3);
	pointer-events: none;
}

/* Flatpickr overrides — keep accent color */
.flatpickr-calendar {
	font-family: 'DM Sans', sans-serif !important;
	border-radius: 0.8rem !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
	background: #fc694c !important;
	border-color: #fc694c !important;
}

.flatpickr-day:hover {
	background: rgba(252, 105, 76, 0.2) !important;
}

/* ── Length of stay ──────────────────────────────────────── */

.stay-duration-row {
	display: flex;
	gap: 0.75rem;
	align-items: center;
}

.stay-duration-num {
	background: #f7f8fa !important;
	border: 1px solid rgba(0, 0, 0, 0.15) !important;
	border-radius: 0.6rem !important;
	color: #0f1117 !important;
	font-family: 'DM Sans', sans-serif !important;
	font-size: 0.95rem !important;
	padding: 0.8rem 1rem !important;
	width: 6rem !important;
	box-sizing: border-box !important;
	outline: none !important;
	transition:
		border-color 0.2s ease,
		background 0.2s ease !important;
	-moz-appearance: textfield;
}

.stay-duration-num::-webkit-inner-spin-button,
.stay-duration-num::-webkit-outer-spin-button {
	-webkit-appearance: none;
}

.stay-duration-num:focus {
	border-color: #fc694c !important;
	background: #fff !important;
}

.stay-duration-num::placeholder {
	color: rgba(0, 0, 0, 0.35) !important;
}

.stay-duration-unit-wrapper {
	flex: 1;
}

.stay-duration-unit-wrapper select {
	width: 100%;
}

/* ── Who card ────────────────────────────────────────────── */

.who-card {
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 0.75rem;
	padding: 1.25rem;
	background: #f7f8fa;
}

.who-card-title {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.88rem;
	font-weight: 600;
	color: #0f1117;
	margin-bottom: 0.25rem;
}

.who-card-subtitle {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.78rem;
	color: rgba(0, 0, 0, 0.45);
	margin-bottom: 1rem;
}

.who-max-note {
	color: rgba(0, 0, 0, 0.3);
}

.who-grid {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.who-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.8rem 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);

	&:last-child {
		border-bottom: none;
	}
}

.who-row-pets {
	padding-bottom: 0;
}

.who-row-info {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.who-row-label {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.9rem;
	font-weight: 500;
	color: #0f1117;
}

.who-row-age {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.75rem;
	color: rgba(0, 0, 0, 0.4);
}

/* Counter */
.who-counter {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.counter-btn {
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	border: 1.5px solid rgba(0, 0, 0, 0.2);
	background: transparent;
	color: #0f1117;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition:
		border-color 0.2s ease,
		color 0.2s ease,
		background 0.2s ease;
	flex-shrink: 0;
	padding: 0;
}

.counter-btn:hover:not(:disabled) {
	border-color: #fc694c;
	color: #fc694c;
	background: rgba(252, 105, 76, 0.1);
}

.counter-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.counter-value {
	font-family: 'DM Sans', sans-serif;
	font-size: 1rem;
	font-weight: 500;
	color: #0f1117;
	min-width: 1.5rem;
	text-align: center;
}

/* Pet details textarea */
.pet-details {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.pet-details[hidden] {
	display: none;
}

.pet-details-label {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.83rem;
	font-weight: 500;
	color: #0f1117;
	display: flex;
	align-items: baseline;
	gap: 0.4rem;
}

.pet-details textarea {
	background: #f7f8fa;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 0.6rem;
	color: #0f1117;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.9rem;
	padding: 0.75rem 1rem;
	width: 100%;
	box-sizing: border-box;
	outline: none;
	resize: none;
	line-height: 1.6;
	transition:
		border-color 0.2s ease,
		background 0.2s ease;
}

.pet-details textarea::placeholder {
	color: rgba(0, 0, 0, 0.35);
}

.pet-details textarea:focus {
	border-color: #fc694c;
	background: #fff;
}

/* ── Status & submit ─────────────────────────────────────── */

/* Hide the footer CTA button — already on the contact page */
.btn-cta-contact-us {
	display: none;
}

.contact-status {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.9rem;
	padding: 0.875rem 1rem;
	border-radius: 0.6rem;
	line-height: 1.5;
	margin: 0;
}

.contact-status[hidden] {
	display: none;
}

.contact-status[data-state='success'] {
	background: rgba(34, 197, 94, 0.08);
	border: 1px solid rgba(34, 197, 94, 0.3);
	color: #16a34a;
}

.contact-status[data-state='error'] {
	background: rgba(239, 68, 68, 0.06);
	border: 1px solid rgba(239, 68, 68, 0.2);
	color: #dc2626;
}

.btn-contact-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	padding: 0.95rem 2.5rem;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #fff;
	background: #fc694c;
	border: 1px solid #fc694c;
	border-radius: 100px;
	cursor: pointer;
	transition:
		background 0.35s ease,
		color 0.35s ease;
}

.btn-contact-submit:hover {
	background: transparent;
	color: #fc694c;
}

.btn-contact-submit:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.site-header {
	position: fixed;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 1024px) {
	.contact-layout {
		grid-template-columns: 1fr;
		gap: 3rem;
	}

	.contact-intro {
		position: static;
	}
}

@media (max-width: 700px) {
	.contact-page {
		padding: clamp(2rem, 5svh, 3.5rem) 1.25rem;
	}

	/* JS mode: two-row mobile header (nav + badge) needs extra breathing room below it */
	html.js .contact-page {
		padding-top: clamp(3rem, 7svh, 4.5rem);
	}

	/* No-JS: the header expands to 3 rows (~6rem). Override top padding to clear it. */
	html.no-js .contact-page {
		padding-top: 7.5rem;
	}

	.form-row {
		grid-template-columns: 1fr;
	}

	.role-grid {
		grid-template-columns: 1fr;
	}

	.btn-contact-submit {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.contact-page {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.form-section {
		padding: 1.25rem 1rem;
	}
}
