/**
 * NPS atlas blocks: the entry night panel, place-page badges and lists, the wildlife species
 * block, the allied-site atlas line. Enqueued by inc/nps-atlas.php on those singles only.
 *
 * @since 2.23.0
 */

.nps-night {
	margin: 2rem 0 0;
	padding: 1.25rem 1.5rem 1rem;
	background: #fff;
	border: 1px solid rgba(44, 24, 16, 0.12);
	border-radius: 8px;
}
.nps-night-title {
	font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
	font-size: 1.2rem;
	color: #2C1810;
	margin: 0 0 0.9rem;
}
.nps-night-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1.25rem;
	align-items: start;
}
.nps-night-grid.is-textonly {
	grid-template-columns: minmax(0, 1fr);
}
.nps-night-camp {
	font-size: 1.05rem;
	font-weight: 600;
	color: #2C1810;
	margin: 0 0 0.25rem;
	overflow-wrap: anywhere;
}
.nps-night-source,
.nps-night-miles {
	font-size: 0.85rem;
	color: #5a3a20;
	margin: 0 0 0.6rem;
}
.nps-night-miles span {
	color: #856E50;
}
.nps-night-h3 {
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #856E50;
	margin: 1rem 0 0.4rem;
}
.nps-night-sites {
	list-style: none;
	padding: 0;
	margin: 0;
}
.nps-night-sites li {
	padding: 0.35rem 0;
	border-bottom: 1px solid rgba(44, 24, 16, 0.06);
	font-size: 0.9rem;
}
.nps-night-sites li:last-child {
	border-bottom: none;
}
.nps-night-sites a {
	color: #8B6914;
	font-weight: 600;
	text-decoration: none;
}
.nps-night-sites a:hover {
	text-decoration: underline;
}
.nps-night-sites li > span {
	display: block;
	font-size: 0.75rem;
	color: #856E50;
}
.nps-night-360,
.nps-night-explore {
	margin: 0.9rem 0 0;
}
.nps-night-360 + .nps-night-explore {
	margin-top: 0.4rem;
}
.nps-night-360 a,
.nps-night-explore a {
	color: #8B6914;
	font-weight: 600;
	text-decoration: none;
}
.nps-night-map {
	height: 280px;
	border-radius: 6px;
	overflow: hidden;
	background: #eee8dc;
}
.nps-night-credit,
.nps-credit {
	margin: 0.9rem 0 0;
	padding-top: 0.6rem;
	border-top: 1px dashed rgba(44, 24, 16, 0.12);
	font-size: 0.72rem;
	color: #856E50;
}
.nps-night-credit a,
.nps-credit a {
	color: #8B6914;
	text-decoration: underline; /* the link is 1.05:1 against the credit text; colour alone cannot mark it */
}

/* Place pages */
.nps-badge {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin: 0.6rem 0 0;
	padding: 0.3rem 0.7rem;
	border: 1px solid rgba(45, 157, 166, 0.35);
	border-radius: 999px;
	background: rgba(45, 157, 166, 0.08);
	color: #1f6f75;
	font-size: 0.8rem;
}
.nps-badge a {
	color: inherit;
	font-weight: 600;
}
.nps-credit.nps-badge-credit {
	margin-top: 0.45rem;
	padding-top: 0;
	border-top: 0;
}
.nps-place-nights {
	margin-top: 2.25rem;
}
.nps-place-nights ul,
.nps-visit ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.nps-place-nights li {
	display: flex;
	gap: 0.9rem;
	align-items: baseline;
	padding: 0.5rem 0;
	border-bottom: 1px solid rgba(44, 24, 16, 0.06);
	font-size: 0.9rem;
}
.nps-place-nights .nps-when {
	flex: 0 0 11.5rem;
	font-size: 0.8rem;
	font-weight: 700;
	color: #8B6914;
}
.nps-place-nights .nps-where {
	color: #2C1810;
	overflow-wrap: anywhere;
}
.nps-place-nights a {
	color: #8B6914;
	white-space: nowrap;
}
.nps-visit li {
	padding: 0.4rem 0;
	border-bottom: 1px solid rgba(44, 24, 16, 0.06);
}
.nps-visit li:last-child {
	border-bottom: none;
}
.nps-visit li > a,
.nps-visit li > strong {
	display: block; /* a wrapped name takes its own line height, as .xp-near-name does */
	color: #2C1810;
	font-weight: 600;
	font-size: 0.88rem;
	text-decoration: none;
}
.nps-visit li > a:hover {
	color: #8B6914;
}
.nps-visit li > span {
	display: block;
	font-size: 0.72rem;
	color: #856E50;
}
.nps-moved {
	margin: 0 0 1.5rem;
	padding: 0.85rem 1rem;
	background: #f4ece1;
	border: 1px solid rgba(184, 115, 51, 0.25);
	border-radius: 6px;
	font-size: 0.92rem;
	color: #5a3a20;
}
.nps-moved a {
	color: #836313; /* #8B6914 is 4.34:1 on the #f4ece1 tint */
	font-weight: 600;
}

/* Wildlife */
.nps-species {
	margin: 2rem 0 0;
	padding: 1.25rem 1.5rem 1rem;
	background: #fff;
	border: 1px solid rgba(44, 24, 16, 0.12);
	border-radius: 8px;
}
.nps-species h2 {
	font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
	font-size: 1.2rem;
	color: #2C1810;
	margin: 0 0 0.75rem;
}
.nps-species-item + .nps-species-item {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(44, 24, 16, 0.06);
}
.nps-species-item h3 {
	font-size: 1rem;
	margin: 0 0 0.2rem;
	color: #2C1810;
}
.nps-species-meta {
	font-size: 0.8rem;
	color: #856E50;
	margin: 0 0 0.4rem;
}
.nps-species-brief {
	font-size: 0.95rem;
	color: #3D2E1F;
	margin: 0 0 0.5rem;
}
.nps-species-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
	font-size: 0.85rem;
	margin: 0;
}
.nps-species-links a {
	color: #8B6914;
	font-weight: 600;
}
.nps-species-links a:hover {
	text-decoration: underline;
}

/* Allied sites: the "NPS atlas" row spans the info grid, so its line and credit read across. */
.as-info-item.nps-allied {
	grid-column: 1 / -1;
}
.as-info-item.nps-allied .info-label {
	color: #856E50; /* the template's #8B7355 is 4.23:1 on the #FAF8F5 grid */
}
.as-info-item.nps-allied .info-value a:hover {
	color: #6B4F0E; /* the template's hover #c9a962 is 2.12:1 on #FAF8F5 */
	text-decoration: underline; /* the hover colour alone is 2.21:1 against the row text */
}
.nps-credit.nps-allied-credit {
	margin-top: 0.2rem;
	padding-top: 0;
	border-top: 0;
}

@media (max-width: 768px) {
	.nps-night {
		padding: 1rem;
	}
	.nps-night-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.nps-night-map {
		height: 240px;
	}
	.nps-place-nights li {
		flex-direction: column;
		gap: 0.15rem;
	}
	.nps-place-nights .nps-when {
		flex-basis: auto;
	}
	/* The widest badge is 544px on one line, so here it wraps: the status takes its own line and
	   drops its separator, and no line of the badge starts with a "·". */
	.nps-badge-status {
		flex-basis: 100%;
	}
	.nps-badge-sep {
		display: none;
	}
}
