/* Step 105 – Branding integrity. Applied AFTER Step 104 and all older inline
   header rules. Fix multiple mutually exclusive RPM images rendering together.
   No changes to saved data, calculations, browser state, or navigation actions. */

/* The app carries BOTH Autoworks and Investment artworks in the same lockup.
   Never force the inactive image to display: Step 104 did so by using a
   broad .rpm-brand-lockup img { display:block!important } rule. */
html body:not(.rpm-invest-mode) #main-app .topbar .rpm-brand-lockup > img.rpm-invest-header-logo,
html body.parts-green-theme #main-app .topbar .rpm-brand-lockup > img.rpm-invest-header-logo {
  display:none!important;
  visibility:hidden!important;
  width:0!important;
  height:0!important;
  max-height:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  flex:0 0 0!important;
}
html body:not(.rpm-invest-mode) #main-app .topbar .rpm-brand-lockup > img:not(.rpm-invest-header-logo),
html body.parts-green-theme #main-app .topbar .rpm-brand-lockup > img:not(.rpm-invest-header-logo){
  display:block!important;
  visibility:visible!important;
  width:100%!important;
  height:60px!important;
  max-height:60px!important;
  max-width:100%!important;
  min-width:0!important;
  object-fit:contain!important;
  object-position:center!important;
  flex:0 1 auto!important;
}
html body.rpm-invest-mode:not(.parts-green-theme) #main-app .topbar .rpm-brand-lockup > img:not(.rpm-invest-header-logo){
  display:none!important;
  visibility:hidden!important;
  width:0!important;
  height:0!important;
  max-height:0!important;
  flex:0 0 0!important;
}
html body.rpm-invest-mode:not(.parts-green-theme) #main-app .topbar .rpm-brand-lockup > img.rpm-invest-header-logo{
  display:block!important;
  visibility:visible!important;
  width:100%!important;
  height:60px!important;
  max-height:60px!important;
  min-width:0!important;
  max-width:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  mix-blend-mode:normal!important;
  flex:0 1 auto!important;
}

/* Keep only the myLotDesk artwork + ONE active RPM brand in the top bar.
   Dealer Profile still retains its custom logo; it does not repeat in header. */
html body #main-app .topbar .topbar-dealer-area > #dealer-brand-logo,
html body #main-app .topbar .topbar-dealer-area > #dealer-brand-fallback{
  display:none!important;
}
html body #main-app .topbar .rpm-brand-lockup,
html body.ld63-autoworks #main-app .topbar .rpm-brand-lockup,
html body.parts-green-theme #main-app .topbar .rpm-brand-lockup,
html body.rpm-invest-mode #main-app .topbar .rpm-brand-lockup{
  flex-direction:row!important;
  align-items:center!important;
  justify-content:center!important;
  gap:0!important;
  overflow:hidden!important;
  height:70px!important;
  max-height:70px!important;
  min-height:0!important;
  width:clamp(146px,18vw,210px)!important;
  max-width:210px!important;
  min-width:0!important;
  flex:0 0 clamp(146px,18vw,210px)!important;
  padding:0 0 0 15px!important;
  margin:0!important;
  background:transparent!important;
  border:0!important;
  border-left:1px solid #356e96!important;
  box-shadow:none!important;
}
html body.parts-green-theme #main-app .topbar .rpm-brand-lockup{border-left-color:#277853!important}
html body.rpm-invest-mode:not(.parts-green-theme) #main-app .topbar .rpm-brand-lockup{border-left-color:#71747a!important}
html body #main-app .topbar .rpm-brand-lockup > span.rove-company-tag{display:none!important}

/* A business card on the home page remains clickable, but its logo must
   never look like a second oversized application masthead. */
html body.combined-home-overview #main-app .combined-overview .overview-snapshot .overview-brand-heading{
  display:flex!important;
  justify-content:flex-start!important;
  align-items:center!important;
  min-height:65px!important;
  max-height:84px!important;
  overflow:hidden!important;
}
html body.combined-home-overview #main-app .combined-overview .overview-snapshot .overview-brand-logo{
  display:block!important;
  height:64px!important;
  max-height:64px!important;
  width:min(210px,100%)!important;
  max-width:210px!important;
  margin:0!important;
  object-fit:contain!important;
  object-position:left center!important;
}
@media(max-width:720px){
  html body #main-app .topbar .rpm-brand-lockup,
  html body.ld63-autoworks #main-app .topbar .rpm-brand-lockup,
  html body.parts-green-theme #main-app .topbar .rpm-brand-lockup,
  html body.rpm-invest-mode #main-app .topbar .rpm-brand-lockup{
    flex:0 0 132px!important;
    width:132px!important;
    max-width:132px!important;
    height:53px!important;
    max-height:53px!important;
    padding-left:10px!important;
  }
  html body:not(.rpm-invest-mode) #main-app .topbar .rpm-brand-lockup > img:not(.rpm-invest-header-logo),
  html body.parts-green-theme #main-app .topbar .rpm-brand-lockup > img:not(.rpm-invest-header-logo),
  html body.rpm-invest-mode:not(.parts-green-theme) #main-app .topbar .rpm-brand-lockup > img.rpm-invest-header-logo{
    height:49px!important;
    max-height:49px!important;
  }
}
@media(max-width:430px){
  html body #main-app .topbar .rpm-brand-lockup,
  html body.ld63-autoworks #main-app .topbar .rpm-brand-lockup,
  html body.parts-green-theme #main-app .topbar .rpm-brand-lockup,
  html body.rpm-invest-mode #main-app .topbar .rpm-brand-lockup{
    flex:0 0 112px!important;
    width:112px!important;
    max-width:112px!important;
  }
  html body.combined-home-overview #main-app .combined-overview .overview-snapshot .overview-brand-logo{
    width:min(174px,100%)!important;
    max-width:174px!important;
    height:57px!important;
    max-height:57px!important;
  }
}
