/**
 * Image variation: Caption Card
 *
 * Image + caption in a single bordered card with shared bg/radius/padding.
 * The default starter for the image post format pattern (Phase 5
 * updates patterns/image.php to insert this variation by default).
 *
 * Layout: keep <figure>'s default block layout — image stacks above
 * caption naturally. We just paint the surface around them and treat
 * the caption as the card's footer.
 *
 * @package PostFormatsBlockThemes
 * @since 2.1.0
 */

.wp-block-image.is-style-caption-card {
	background: var(--pfbt-caption-card-bg, var(--wp--preset--color--tertiary, var(--wp--preset--color--base, #f5f5f5)));
	border-radius: var(--wp--preset--border-radius--lg, 0.75rem);
	overflow: hidden;
	display: inline-block;
	max-width: 100%;
}

.wp-block-image.is-style-caption-card img {
	display: block;
	width: 100%;
}

.wp-block-image.is-style-caption-card figcaption {
	padding-block: var(--wp--preset--spacing--small, 0.75rem);
	padding-inline: var(--wp--preset--spacing--medium, 1.5rem);
	margin: 0;
	font-family: var(--wp--preset--font-family--primary, system-ui, sans-serif);
	color: var(--pfbt-caption-card-fg, var(--wp--preset--color--main, var(--wp--preset--color--contrast, #0a0a0a)));
}

@media print {
	.wp-block-image.is-style-caption-card {
		background: transparent;
		border: 1px solid currentColor;
	}
}
