/**
 * ASAN Farm Map — single farm page.
 *
 * Scoped under .asan-fm-single and deliberately restrained: this template only
 * renders when the theme supplies none of its own, so it should look like it
 * belongs to whatever theme is hosting it rather than assert a design. Spacing
 * and structure only; the theme keeps its typography and colours.
 */

.asan-fm-single {
	--asan-fm-single-border: #d6d8da;
	--asan-fm-single-muted: #55595c;
	--asan-fm-single-accent: #1a6b3c;
	--asan-fm-single-radius: 6px;
}

.asan-fm-single__article {
	max-width: 48rem;
	margin: 0 auto;
	padding: 2rem 1rem 3rem;
}

.asan-fm-single__header {
	margin-bottom: 1.5rem;
}

.asan-fm-single__title {
	margin: 0 0 0.5rem;
}

.asan-fm-single__address {
	margin: 0;
	color: var( --asan-fm-single-muted );
}

.asan-fm-single__badge {
	margin: 0 0 0.5rem;
}

.asan-fm-single__badge .asan-fm-pill {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 10px;
	background: #edf7ed;
	color: #14522e;
	font-size: 0.8125rem;
	font-weight: 600;
}

.asan-fm-single__photo {
	margin: 0 0 1.5rem;
}

.asan-fm-single__photo img {
	max-width: 100%;
	height: auto;
	border-radius: var( --asan-fm-single-radius );
}

.asan-fm-single__description {
	margin-bottom: 2rem;
}

.asan-fm-single__section {
	margin-bottom: 2rem;
}

.asan-fm-single__section h2 {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
}

.asan-fm-single__map {
	height: 320px;
	margin-bottom: 0.75rem;
	border: 1px solid var( --asan-fm-single-border );
	border-radius: var( --asan-fm-single-radius );
	/* Divi's header sits at z-index 99999 and Leaflet's panes run 200–700;
	   a stacking context of its own keeps the map underneath the chrome. */
	position: relative;
	z-index: 1;
}

.asan-fm-single [hidden] {
	display: none !important;
}

.asan-fm-single__details {
	display: grid;
	grid-template-columns: minmax( 8rem, 12rem ) 1fr;
	gap: 0.5rem 1.5rem;
	margin: 0;
}

.asan-fm-single__details dt {
	margin: 0;
	color: var( --asan-fm-single-muted );
	font-weight: 600;
}

.asan-fm-single__details dd {
	margin: 0;
}

.asan-fm-single__contact {
	margin: 0;
	padding: 0;
	list-style: none;
}

.asan-fm-single__contact li {
	margin-bottom: 0.375rem;
}

/* The component owns its own contrast rather than inheriting a theme link
   colour that may not clear WCAG AA on white. Divi's default measures 2.75:1. */
.asan-fm-single__contact a,
.asan-fm-single__directions {
	color: var( --asan-fm-single-accent );
}

@media ( max-width: 600px ) {
	.asan-fm-single__details {
		grid-template-columns: 1fr;
		gap: 0.125rem;
	}

	.asan-fm-single__details dd {
		margin-bottom: 0.75rem;
	}
}

.asan-fm-single__back {
	margin: 2rem 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid var( --asan-fm-single-border );
}

.asan-fm-single__back a {
	color: var( --asan-fm-single-accent );
	font-weight: 600;
}
