/* ==========================================================================
   Contact page. Loaded only on the page whose slug is "contact" — see
   pm_theme_assets() in inc/enqueue.php.
   ========================================================================== */

/* minmax(0, …) rather than a bare 1fr: a bare fr column can't shrink below
   its widest child's natural width, and hCaptcha's widget is a fixed 302px.
   On a 360px phone that stretched the column to 352px and scrolled the whole
   page sideways. */
.pm-contact-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 3rem;
}

@media (min-width: 1024px) {
	.pm-contact-grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 4rem;
	}
}

/* --------------------------------------------------------------------------
   Left column — contact details
   -------------------------------------------------------------------------- */

.pm-contact-list {
	margin-top: 2rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.pm-contact-item {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

a.pm-contact-item {
	transition: opacity 0.2s var(--ease);
}

a.pm-contact-item:hover {
	opacity: 0.8;
}

.pm-contact-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background-color: var(--accent-glow);
	color: var(--accent-text);
}

.pm-contact-item__label {
	font-family: var(--font-display);
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-secondary);
}

.pm-contact-item__value {
	margin-top: 0.125rem;
	color: var(--text-primary);
}

.pm-contact-hours {
	margin-top: 0.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	font-size: 0.875rem;
	color: var(--text-secondary);
}

.pm-contact-cta {
	margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   Right column — the form
   -------------------------------------------------------------------------- */

.pm-contact-form {
	padding: 1.5rem;
	background-color: var(--bg-elevated);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
}

@media (min-width: 640px) {
	.pm-contact-form {
		padding: 2rem;
	}
}

/* Below 400px the form's content box is narrower than hCaptcha's fixed 302px
   widget, which can't be restyled from outside its iframe. Scaling it to
   90% fits it at 360px while keeping the checkbox comfortably tappable; the
   negative margin takes back the height the scale frees up. */
@media (max-width: 399.98px) {
	.pm-contact-form {
		padding: 1.25rem 1rem;
	}

	.pm-contact-form .h-captcha {
		transform: scale(0.9);
		transform-origin: 0 0;
		margin-bottom: -8px;
	}
}

.pm-contact-form__head {
	margin-bottom: 1.5rem;
}

.pm-contact-form__rule {
	display: block;
	width: 2.5rem;
	height: 2px;
	margin-top: 0.375rem;
	background-color: var(--accent);
}

.pm-contact-form__fields {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.pm-contact-form__note {
	margin-top: 1rem;
	text-align: center;
	font-size: 0.75rem;
	color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Map
   -------------------------------------------------------------------------- */

.pm-contact-map {
	margin-top: 1.5rem;
	overflow: hidden;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
}

.pm-contact-map iframe {
	width: 100%;
	height: 400px;
	border: 0;
	/* Recolours the default Google Maps chrome so it doesn't sit as a bright
	   rectangle on an otherwise obsidian-dark page. */
	filter: grayscale(1) invert(0.92) contrast(1.1);
}

.pm-contact-address {
	margin-top: 0.75rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: var(--text-secondary);
}

.pm-contact-address .pm-icon {
	color: var(--accent-text);
}
