/**
 * Image variation: Phone Frame
 *
 * Stylized rounded-rectangle device frame with a notch. Aspect locked
 * to 9:19.5 (modern phone screen ratio). Frame chrome is skeuomorphic
 * hardware — near-black bezel fixed on any palette so it reads as a
 * generic device, not a specific brand.
 *
 * @package PostFormatsBlockThemes
 * @since 2.1.0
 */

.wp-block-image.is-style-phone-frame {
	position: relative;
	display: inline-block;
	max-width: 18rem;
	padding: 0.75rem;
	padding-block-start: 1.5rem;
	background: var(--pfbt-phone-frame-bezel, #0a0a0a);
	border-radius: 2rem;
	box-shadow: var(--wp--preset--shadow--medium, 0 4px 12px rgba(0, 0, 0, 0.08));
}

.wp-block-image.is-style-phone-frame::before {
	content: "";
	position: absolute;
	inset-block-start: 0.4rem;
	inset-inline-start: 50%;
	transform: translateX(-50%);
	width: 30%;
	height: 0.6rem;
	background: var(--pfbt-phone-frame-notch, #ffffff);
	opacity: 0.15;
	border-radius: 0.6rem;
}

.wp-block-image.is-style-phone-frame img {
	display: block;
	width: 100%;
	aspect-ratio: 9 / 19.5;
	object-fit: cover;
	border-radius: 1.25rem;
}

.wp-block-image.is-style-phone-frame figcaption {
	margin-block-start: var(--wp--preset--spacing--small, 0.75rem);
	margin-block-end: 0;
	margin-inline: 0;
	padding: 0;
	color: var(--pfbt-phone-frame-caption, #fafafa);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	text-align: center;
}

@media print {
	.wp-block-image.is-style-phone-frame {
		background: transparent;
		border: 1px solid currentColor;
		box-shadow: none;
	}
	.wp-block-image.is-style-phone-frame::before {
		display: none;
	}
	.wp-block-image.is-style-phone-frame img {
		aspect-ratio: auto;
	}
}
