/* Mobile host presentation only. Existing artwork, copy, colors, fonts, page
   order and runtime controls are supplied by the production customer pages. */
@media screen{
  body[data-cd-mobile="true"]{
    --cd-mobile-header-height:85px;
  }
  body[data-cd-mobile="true"] .cd-mobile-version-switch{
    padding:12px 16px calc(92px + env(safe-area-inset-bottom,0px));
    text-align:center;
    font-size:12px;
  }
  body[data-cd-mobile="true"] .cd-mobile-version-switch a{
    display:inline-flex;
    align-items:center;
    min-height:44px;
    color:inherit;
  }
}
@media screen and (max-width:800px){
  body[data-cd-mobile="true"]{
    --cd-mobile-header-height:73px;
  }
}
@media screen and (max-width:768px){
  /* Show every published brand without a partly clipped next card. */
  body[data-cd-mobile="true"].cd-homepage #brands .v19-brands{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    overflow:visible;
    scroll-snap-type:none;
  }
  body[data-cd-mobile="true"].cd-homepage #brands .v19-brand{
    width:auto;
    height:auto;
    min-height:200px;
    padding:22px 14px;
    border-bottom:1px solid #dce2e7;
    overflow-wrap:anywhere;
  }
  body[data-cd-mobile="true"].cd-homepage #brands .v19-brand-logo img{
    max-width:100%;
  }
  body[data-cd-mobile="true"].cd-homepage #brands .cd-brand-controls{
    display:none;
  }
  /* The existing logo, menu and account control fit together at 320px. */
  body[data-cd-mobile="true"] #header.cd-site-header{
    height:auto!important;
  }
  body[data-cd-mobile="true"] #header.cd-site-header .cd-header-inner{
    width:calc(100% - 32px)!important;
    gap:8px!important;
    height:auto!important;
    flex-wrap:wrap;
    min-width:0;
  }
  body[data-cd-mobile="true"] #header.cd-site-header .cd-header-login{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:74px;
    height:44px!important;
    min-height:44px!important;
    padding-inline:10px!important;
  }
  body[data-cd-mobile="true"] #header.cd-site-header .cd-mobile-menu{
    flex:0 0 auto;
    min-width:44px;
    height:44px!important;
    min-height:44px!important;
    padding-inline:10px!important;
  }
  body[data-cd-mobile="true"] #header #cd-primary-nav{
    max-height:calc(100dvh - var(--cd-mobile-header-height) - env(safe-area-inset-bottom,0px));
    overflow-y:auto;
    overscroll-behavior-y:contain;
  }
  body[data-cd-mobile="true"] #header #cd-primary-nav :is(a,button){
    min-height:44px;
  }

  /* Existing selectors and filters keep their current wrapping and styling. */
  body[data-cd-mobile="true"] .showroom :is(.brand-tab,.filter),
  body[data-cd-mobile="true"] .workspace :is(.brand-tab,.brand-tabs button),
  body[data-cd-mobile="true"] .review-pagination button,
  body[data-cd-mobile="true"] .auth-tabs a{
    min-height:44px;
  }
  body[data-cd-mobile="true"] .showroom :is(.showroom-heading,.collection-toolbar,.vehicles,.vehicle),
  body[data-cd-mobile="true"] .workspace :is(.filter-top,.filters,.mobile-card),
  body[data-cd-mobile="true"].customer-auth :is(.auth-content,.auth-layout,.auth-services),
  body[data-cd-mobile="true"].cd-mypage :is(.my-main,.my-welcome-account,.my-card-head,.my-row-meta){
    min-width:0;
  }
  body[data-cd-mobile="true"] .showroom .filter,
  body[data-cd-mobile="true"] .workspace .brand-tab{
    max-width:100%;
  }

  /* Keep product tables and existing horizontal tabs inside their own region. */
  body[data-cd-mobile="true"].package-page :is(.package-items-table,.quote-table-wrap,.brand-tabs),
  body[data-cd-mobile="true"].cd-mypage .my-topbar nav,
  body[data-cd-mobile="true"].cs-page .cs-subnav,
  body[data-cd-mobile="true"].purchase-page .purchase-tabs{
    max-width:100%;
    overscroll-behavior-x:contain;
  }
  body[data-cd-mobile="true"] .review-dialog{
    max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
    overscroll-behavior:contain;
  }
  body[data-cd-mobile="true"].package-page .quote-dialog{
    max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
    overscroll-behavior:contain;
  }
  body[data-cd-mobile="true"] .review-dialog :is(.dialog-title,.dialog-body),
  body[data-cd-mobile="true"] .chadap-footer .cd-company-details{
    overflow-wrap:anywhere;
  }
  body[data-cd-mobile="true"] .chadap-footer .cd-company-details>div{
    min-width:0;
    max-width:100%;
  }
}
