/* HM245: ONE unified main image. Both dashboard and editor use the same Jinja
   component and this exact rendering rule. The companion is deliberately absent
   from the DOM; its historical DB fields/files stay untouched. */
body.hm185-app .app-shell .page-content .hm185-dashboard > .hm185-banner {
  display:block!important;width:100%!important;min-width:0!important;
  max-width:100%!important;padding:0!important;margin:0 0 14px!important;
  border:0!important;background:transparent!important;overflow:visible!important;
  box-sizing:border-box!important;
}
body.hm185-app .app-shell .page-content .hm245-single-banner {
  display:block!important;grid-template-columns:none!important;
  width:100%;min-width:0!important;
  height:auto!important;max-height:none!important;
  margin:0!important;padding:0!important;
  aspect-ratio:auto!important;box-sizing:border-box!important;
  overflow:hidden!important;border:0!important;
  border-radius:14px!important;background:#003532;
  box-shadow:inset 0 0 0 1px rgba(223,184,111,.5),0 6px 19px rgba(11,47,44,.10);
}
body.hm185-app .app-shell .page-content .hm245-single-banner .razavi-greeting-v41__message {
  display:block!important;width:100%!important;height:auto!important;max-height:none!important;
  min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;
  /* Legacy v244 container-query layout must not affect the new single image. */
  container-name:none!important;container-type:normal!important;
  background:#003532;overflow:hidden!important;
}
body.hm185-app .app-shell .page-content .hm245-single-banner .razavi-greeting-v41__message::before {
  content:none!important;display:none!important;background:none!important;
}
body.hm185-app .app-shell .page-content .hm245-single-banner .razavi-greeting-v41__message > picture {
  display:block!important;position:relative;width:100%!important;height:auto!important;
  max-height:none!important;min-width:0!important;margin:0!important;padding:0!important;
  overflow:hidden!important;
}
body.hm185-app .app-shell .page-content .hm245-single-banner .razavi-greeting-v41__message > picture > img {
  display:block!important;position:static!important;
  width:100%!important;height:auto!important;max-width:100%!important;
  max-height:none!important;aspect-ratio:8 / 1;
  object-fit:contain!important;object-position:center center!important;
  border:0!important;margin:0!important;padding:0!important;
}
/* No fixed-height viewport, at ANY width: geometry forces a choice between
   cropping/letterboxing/distorting and natural width/8 height. Preserve the
   full artwork and its Arabic text: this 8:1 image dictates the row height.
   A 390px slot is ~49px high; a 1500px slot is ~188px high. */
body.hm185-app .app-shell .page-content .hm245-single-banner.banner-preview-mobile,
body.hm185-app .app-shell .page-content .hm245-single-banner.banner-preview-mobile .razavi-greeting-v41__message > picture > img {
  max-height:none!important;
}
body.hm185-app .app-shell .page-content .hm245-single-banner.banner-preview-mobile .razavi-greeting-v41__message > picture > img {
  object-fit:contain!important;
}
@media(max-width:760px){
  body.hm185-app .app-shell .page-content .hm185-dashboard .hm245-single-banner,
  body.hm185-app .app-shell .page-content .hm185-dashboard .hm245-single-banner .razavi-greeting-v41__message > picture > img {
    max-height:none!important;
  }
  body.hm185-app .app-shell .page-content .hm185-dashboard .hm245-single-banner .razavi-greeting-v41__message > picture > img {
    object-fit:contain!important;
  }
  /* The desktop emulator on a phone also preserves its full 8:1 image. */
}
/* A full-width 8:1 preview image, not a tiny centered picture in a tall thumb. */
body.hm185-app .app-shell .page-content .hm245-banner-editor .banner-image-grid {
  grid-template-columns:minmax(0,1fr)!important;
}
body.hm185-app .app-shell .page-content .hm245-banner-editor .banner-v242-main-thumb {
  height:auto!important;aspect-ratio:8 / 1;max-height:190px;
  width:100%;background:#003532;
}
body.hm185-app .app-shell .page-content .hm245-banner-editor .banner-v242-main-thumb img {
  display:block;width:100%;height:100%;object-fit:cover;
}
body.hm185-app .app-shell .page-content .hm245-banner-editor .banner-preview-viewport {
  width:100%;max-width:100%;min-width:0;position:relative;
  contain:inline-size;overflow:hidden;
}
body.hm185-app .app-shell .page-content .hm245-banner-editor #bannerLivePreview {
  max-width:none!important;
}
