/* Pause/Play chip on animated WebP figures (assets/loop-figure.js). Theme tokens with fallbacks. Sits bottom left
   of the image so it never covers the MageMinion mark bottom right; the script sets `top` from the image box
   (a caption below the image would otherwise push a `bottom` offset under it). */
.wp-block-image.td-figure {
	position: relative;
}

/* <picture> is inline; core's lightbox sizes its expand button from the parent's box. The PHP also prints this inline. */
.wp-block-image.td-figure picture {
	display: block;
}

/* Core's lightbox styles every button in .wp-lightbox-container (20x20, hidden until hover, grey, right 16px,
   specificity up to 0,4,1), so these selectors are deliberately heavier (body figure.wp-block-image.td-figure
   .mm-loop x3 = 0,5,2). */
body figure.wp-block-image.td-figure .mm-loop.mm-loop.mm-loop {
	position: absolute;
	left: 10px;
	right: auto;
	bottom: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	width: auto;
	height: auto;
	min-height: 32px;
	margin: 0;
	padding: 2px 12px 2px 10px;
	border: 2px solid var(--td-ink, #111);
	border-radius: var(--td-radius-pill, 999px);
	background: var(--td-paper, #fff);
	backdrop-filter: none;
	color: var(--td-ink, #111);
	font-family: var(--td-body, inherit);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	box-shadow: 2px 2px 0 var(--td-ink, #111);
	opacity: 1;
	cursor: pointer;
}

body figure.wp-block-image.td-figure .mm-loop.mm-loop.mm-loop[hidden] {
	display: none;
}

body figure.wp-block-image.td-figure .mm-loop.mm-loop.mm-loop:hover {
	border: 2px solid var(--td-ink, #111);
	background: var(--td-lime, #B5F23D);
}

body figure.wp-block-image.td-figure .mm-loop.mm-loop.mm-loop:focus-visible {
	outline: 3px solid var(--td-violet, #7B3DF0);
	outline-offset: 2px;
}

/* Icon: two bars while playing (the button pauses), a triangle while paused (the button plays). */
.mm-loop__icon {
	flex: none;
	width: 10px;
	height: 12px;
	background: linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65% 100%);
}

.mm-loop[data-state="paused"] .mm-loop__icon {
	background: currentColor;
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}
