/* Obituaries CPT — obituary-card + single-obituary template styling. Loaded
   on is_singular('obituaries') || is_post_type_archive('obituaries'). Slice 3. */

.obituary-card .obituary-card__body {
	padding: 20px;
}

.obituary-card__name a {
	color: var(--wp--preset--color--primary-dark);
}

.obituary-card .wp-block-post-featured-image {
	max-width: 100%;
}

/* QA-17: wp:read-more ("Read full obituary") renders as .wp-block-read-more,
   a different class than .wp-block-button__link/.wp-element-button, so it
   didn't inherit the universal button-hover darkening in theme.css. Same
   treatment, scoped here since this block only renders on obituary templates. */
.wp-block-read-more:hover {
	filter: brightness(0.88);
}

.obituary-card .wp-block-post-featured-image img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
	width: 100%;
}

.obituary-card__body > :first-child {
	margin-block-start: 0;
}

/* FU-13-dup: QA-18 unified this onto the --small token (14px) to fix an
   inconsistency with .shoutout-card__date, but locked in the wrong absolute
   size — Figma calls for 11px, smaller than any named theme.json font-size
   token, so it's hardcoded here (matching the pre-QA-18 approach, but with
   the correct value). See shoutouts.css for the matching FU-12 fix. */
.obituary-card__dates {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 11px;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 0;
}

.obituary-card__veteran-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--surface);
	padding: 4px 10px 4px 8px;
	border-radius: 2px;
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.06em;
	line-height: normal;
}

.obituary-card__veteran-star {
	color: var(--wp--preset--color--accent-1);
	font-size: 14px;
}

.obituary-card__veteran-badge-wrap {
	margin-top: 10px;
	margin-bottom: 0;
}

.single-obituary__portrait {
	max-width: 280px;
	margin-left: auto;
	margin-right: auto;
}

.single-obituary__portrait img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.single-obituary__content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

.single-obituary__content > * {
	width: 100%;
	margin-top: 0;
	margin-bottom: 0;
}

.single-obituary__portrait,
.single-obituary__name,
.single-obituary__dates,
.single-obituary__body-heading {
	text-align: center;
}

.single-obituary__veteran-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--surface);
	padding: 4px 10px 4px 8px;
	border-radius: 2px;
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.06em;
	line-height: normal;
	width: auto;
}

.single-obituary__veteran-star {
	color: var(--wp--preset--color--accent-1);
	font-size: 14px;
}

.single-obituary__dates {
	justify-content: center;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 12px;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.single-obituary__funeral-home {
	background: var(--wp--preset--color--surface-alt);
	padding: 20px;
	border: none;
}

.single-obituary__funeral-home-inner {
	font-family: var(--wp--preset--font-family--sans);
}

.single-obituary__funeral-home-label {
	font-weight: 700;
	font-size: 12px;
	color: var(--wp--preset--color--primary);
	letter-spacing: 0.06em;
	margin: 0 0 6px;
}

.single-obituary__funeral-home-name {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--regular);
	color: var(--wp--preset--color--primary-dark);
	margin: 0 0 6px;
}

.single-obituary__funeral-home-details {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--primary-dark);
	margin: 0;
}

.single-obituary__funeral-home-url {
	font-size: var(--wp--preset--font-size--small);
	margin: 4px 0 0;
}

.single-obituary__funeral-home-url a {
	color: var(--wp--preset--color--primary);
}

@media (max-width: 781px) {

	.single-obituary__portrait {
		max-width: 220px;
	}

	.single-obituary__funeral-home {
		text-align: center;
	}
}

/* ---------- obituary CTA (submission) ---------- */

/* QA-19: tighten the default 25px blockGap between heading/paragraph/buttons —
   excessive for this compact box. QA-20: the two 50%-width buttons stay
   side-by-side at any viewport (a percentage split always fits width-wise);
   stack them full-width on mobile instead per the reviewer's expectation. */
.cta-submission-obituary {
	--wp--style--block-gap: 12px;
}

@media (max-width: 480px) {

	.cta-submission-obituary .wp-block-buttons {
		flex-direction: column;
	}

	.cta-submission-obituary .wp-block-button.has-custom-width {
		width: 100%;
	}
}
