/**
 * Play button — round disc, play glyph, text hidden (features/button-play/button-play.php).
 *
 * --button-play-size on any ancestor resizes it. The glyph is a mask, so it
 * takes the text colour; no `path` is passed to the loader, so this file is
 * never inlined and the url() stays relative to it.
 */

/* Light disc, dark glyph. The scheme is pinned, since Raised and Foreground
   are light-dark() and the disc sits on photos and dark sections. Flex, not
   grid: the hidden text is an anonymous item, and in a grid it took a row of
   its own and pushed the glyph off centre. */
.wp-block-button.is-style-play .wp-block-button__link {
	color-scheme: light;
	display: flex;
	align-items: center;
	justify-content: center;
	inline-size: var(--button-play-size, 4.5rem);
	block-size: var(--button-play-size, 4.5rem);
	padding: 0;
	border: 0;
	border-radius: var(--wp--preset--border-radius--circle);
	background-color: var(--wp--preset--color--raised);
	background-image: none;
	color: var(--wp--preset--color--contrast);
	font-size: 0;
	letter-spacing: 0;
	word-spacing: 0;
	box-shadow: var(--wp--preset--shadow--l);
	transition:
		inline-size var(--wp--custom--transition--fast),
		block-size var(--wp--custom--transition--fast);
}

/* The glyph sits a little right of its box centre in play.svg itself, where a
   triangle looks centred; the CSS centres the box. Sized from the disc, not %:
   a % height here resolved to 0. 0.5 because the library triangle fills half
   of its 24-unit box. */
.wp-block-button.is-style-play .wp-block-button__link::before {
	content: "";
	flex-shrink: 0;
	inline-size: calc(var(--button-play-size, 4.5rem) * 0.5);
	block-size: calc(var(--button-play-size, 4.5rem) * 0.5);
	background-color: currentColor;
	mask: url(play.svg) center / contain no-repeat;
}

/* Grows on hover of the disc, or of the Cover it stretches over. By size, not
   transform: a transform makes the link the containing block of a Card link's
   overlay, which then shrinks to the disc and the rest of the Cover stops
   being clickable. */
.wp-block-button.is-style-play .wp-block-button__link:hover,
.wp-block-cover:hover .wp-block-button.is-style-play .wp-block-button__link {
	inline-size: calc(var(--button-play-size, 4.5rem) * 1.08);
	block-size: calc(var(--button-play-size, 4.5rem) * 1.08);
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button.is-style-play .wp-block-button__link {
		transition: none;
	}
}
