/* Works with Quadrat White / Blockbase query loops and Newspack homepage cards. */
.cfb-wrap,
.cfb-wrap--block {
  position: relative !important;
  display: block;
  width: 100%;
  max-width: 100%;
  line-height: 0;
  overflow: hidden;
}

figure.wp-block-post-featured-image,
figure.post-thumbnail,
.wpnbha .post-thumbnail,
.wpnbha .post-thumbnail a,
.wp-block-post-featured-image a {
  position: relative;
}

.cfb-wrap img.wp-post-image,
.cfb-wrap .wp-block-post-featured-image img,
.cfb-wrap figure,
.cfb-wrap figure img,
.cfb-wrap .post-thumbnail img,
.cfb-wrap > img:not(.cfb-badge),
.cfb-wrap--block img:not(.cfb-badge) {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.cfb-wrap .wp-block-post-featured-image,
.cfb-wrap figure {
  margin: 0;
}

/* Keep badge a corner mark — theme img { width:100% } rules must not win. */
.cfb-wrap .cfb-badge,
.cfb-wrap--block .cfb-badge,
img.cfb-badge {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 20% !important;
  max-width: 20% !important;
  height: auto !important;
  object-fit: contain !important;
  pointer-events: none !important;
  z-index: 5 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none;
}
