/* ResepiBunda v5.2.9.8.9 — PHOTO TOP + ONE BROWN BRANDING PANEL.
   HARD VISUAL CONTRACT:
   1) The left column starts with the RECIPE PHOTO. No brown strip may exist above it.
   2) Exactly ONE dark-brown remainder exists below the photo.
   3) That lower remainder contains exactly ONE approved ResepiBunda branding unit.
   4) The right recipe-information panel is outside this scope. */

/* Retire all pseudo branding/layout artifacts from v52987/v52988 first. */
html body :where(.ri-u-media,.recipe-modal-media)::before{
  content:none!important;
  display:none!important;
}

/* Reset the left media host so old flex centering cannot create a brown strip ABOVE the photo. */
html body :where(.ri-u-media,.recipe-modal-media){
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto minmax(130px,1fr)!important;
  align-content:stretch!important;
  justify-content:stretch!important;
  align-items:stretch!important;
  justify-items:stretch!important;
  gap:0!important;
  background:#2f2023!important;
  overflow:hidden!important;
  position:relative!important;
  padding:0!important;
  margin:0!important;
}

/* Every surviving real child belongs to row 1. This resets old flex order/margins
   that could vertically center the photo and leave dark space above it. */
html body :where(.ri-u-media,.recipe-modal-media)>*{
  grid-column:1!important;
  grid-row:1!important;
  order:initial!important;
  flex:none!important;
  align-self:start!important;
  justify-self:stretch!important;
  margin-top:0!important;
  margin-bottom:0!important;
  transform:none!important;
}

/* Retire all legacy/generated branding wrappers. The single approved branding
   is rendered by the ONE lower-row pseudo panel below. */
html body :where(.ri-u-media,.recipe-modal-media)>
:is(.rb52986-brand-panel,.rb52985-brand-panel,.rb52984-brand-panel,.rb52983-brand-stage,.rb52983-tagline-bottom,.rb52982-popup-brand-block,.rb52982-popup-tagline-wrap,.rb5298-popup-brand){
  display:none!important;
  height:0!important;
  min-height:0!important;
  max-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  overflow:hidden!important;
}

/* The canonical recipe image is locked to the TOP and keeps its original 4:3 ratio. */
html body :where(.ri-u-media,.recipe-modal-media) #recipe-modal-image{
  display:block!important;
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  max-height:none!important;
  aspect-ratio:4/3!important;
  object-fit:cover!important;
  object-position:center!important;
  margin:0!important;
  padding:0!important;
}

/* Common direct photo wrappers are also reset to intrinsic photo height. */
html body :where(.ri-u-media,.recipe-modal-media)>:where(picture,.photo,.media-photo,.recipe-photo,.ri-u-photo,.recipe-modal-photo,.rb52985-photo-block){
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  position:relative!important;
  inset:auto!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}

/* ONE AND ONLY ONE BROWN PANEL, directly below the photo. The branding is a
   single precomposed approved graphic, so no separate upper logo/domain layer exists. */
html body :where(.ri-u-media,.recipe-modal-media)::after{
  content:''!important;
  display:block!important;
  grid-column:1!important;
  grid-row:2!important;
  align-self:stretch!important;
  justify-self:stretch!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:130px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-top:1px solid rgba(228,187,93,.18)!important;
  box-sizing:border-box!important;
  background-color:#2f2023!important;
  background-image:url('rb-popup-approved-brand-v52989.png')!important;
  background-repeat:no-repeat!important;
  background-position:center center!important;
  background-size:82% auto!important;
  overflow:hidden!important;
}

@media(max-width:760px){
  html body :where(.ri-u-media,.recipe-modal-media){grid-template-rows:auto minmax(112px,1fr)!important}
  html body :where(.ri-u-media,.recipe-modal-media)::after{min-height:112px!important;background-size:86% auto!important}
}
