/* "Back to {parent}" link — a subtle breadcrumb-style text link, not a button.
 * Uses rcvda-base colour/spacing tokens where available, with neutral
 * fallbacks so it stays muted and on-brand under any active theme.
 */

.rcvda-parent-link {
	margin-top: var(--wp--preset--spacing--40, 1.5rem);
	margin-bottom: 0;
	font-size: 0.9375rem;
	line-height: 1.4;
}

.rcvda-parent-link__a {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	color: var(--wp--preset--color--muted, #555a66);
	text-decoration: none;
	font-weight: 500;
}

.rcvda-parent-link__a:hover,
.rcvda-parent-link__a:focus {
	color: var(--wp--preset--color--brand-light, #033e8c);
	text-decoration: underline;
}

.rcvda-parent-link__icon {
	width: 1em;
	height: 1em;
	flex: 0 0 auto;
	transition: transform 0.15s ease;
}

/* Nudge the chevron on hover for a little affordance — disabled under reduced motion. */
.rcvda-parent-link__a:hover .rcvda-parent-link__icon {
	transform: translateX(-2px);
}

[data-motion="reduced"] .rcvda-parent-link__icon,
[data-motion="reduced"] .rcvda-parent-link__a:hover .rcvda-parent-link__icon {
	transition: none;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.rcvda-parent-link__icon {
		transition: none;
	}
	.rcvda-parent-link__a:hover .rcvda-parent-link__icon {
		transform: none;
	}
}


/* End-of-page band wrapper for the AUTO-INSERTED parent link (see
 * shortcode-parent-finder.php). Gives the link a deliberate, contained
 * navigation row wherever the content ends — including after a full-bleed
 * section — rather than stray text at the foot of the body. The [parent_finder]
 * shortcode is unaffected (bare inline link). Tokens with neutral fallbacks. */
.rcvda-parent-link-band {
	border-top: 1px solid var(--wp--preset--color--divider, #d7d2c8);
	padding-top: var(--wp--preset--spacing--40, 1.5rem);
	padding-bottom: var(--wp--preset--spacing--40, 1.5rem);
}

.rcvda-parent-link-band__inner {
	max-width: var(--wp--style--global--content-size, 1120px);
	margin-inline: auto;
	padding-inline: var(--wp--preset--spacing--40, 1.5rem);
}

/* The link's own top margin is redundant once it sits inside the band. */
.rcvda-parent-link-band .rcvda-parent-link {
	margin-top: 0;
}
