/*
 * The site keeps the WordPress 5.5 block stylesheet (legacy/block-library-5.5.css). When a page is saved in the
 * current editor, some blocks are re-saved with newer markup that the 5.5 stylesheet does not cover. These rules
 * make that newer markup look the same as the 5.5 markup it replaces. They only match the newer markup.
 */

/* Cover (since WP 5.6/6.x): the image is an <img> and the colour overlay a <span>, instead of CSS backgrounds. */
.wp-block-cover > .wp-block-cover__image-background,
.wp-block-cover > .wp-block-cover__video-background {
	position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 0;
	width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;
	object-fit: cover; border: none; box-shadow: none; outline: none;
}
.wp-block-cover > .wp-block-cover__background {
	position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1;
	background-color: #000; opacity: .5;
}
.wp-block-cover > .wp-block-cover__background.has-background-dim-0 { opacity: 0; }
.wp-block-cover > .wp-block-cover__background.has-background-dim-10 { opacity: .1; }
.wp-block-cover > .wp-block-cover__background.has-background-dim-20 { opacity: .2; }
.wp-block-cover > .wp-block-cover__background.has-background-dim-30 { opacity: .3; }
.wp-block-cover > .wp-block-cover__background.has-background-dim-40 { opacity: .4; }
.wp-block-cover > .wp-block-cover__background.has-background-dim-50 { opacity: .5; }
.wp-block-cover > .wp-block-cover__background.has-background-dim-60 { opacity: .6; }
.wp-block-cover > .wp-block-cover__background.has-background-dim-70 { opacity: .7; }
.wp-block-cover > .wp-block-cover__background.has-background-dim-80 { opacity: .8; }
.wp-block-cover > .wp-block-cover__background.has-background-dim-90 { opacity: .9; }
.wp-block-cover > .wp-block-cover__background.has-background-dim-100 { opacity: 1; }
.wp-block-cover > .wp-block-cover__inner-container { position: relative; z-index: 1; }

/* Resized image (since WP 6.3): the size is saved as an inline width AND height; 5.5 used width/height attributes,
   so a narrow column scaled the height down with the width. */
.wp-block-image img[style*="height"]:not([style*="object-fit"]) { height: auto !important; }
