/* 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%;
  }
}

/* The home keeps company/contact details. Functional pages keep their own
   forms, quote controls and documents without the repeated company footer. */
body[data-cd-mobile="true"]:not([data-cd-mobile-home="true"]) .chadap-footer,
body[data-cd-mobile="true"] #quote-ai-open{display:none!important}

/* App visual system: a shared rhythm for customer screens, without changing
   document output, provider branding, controls or customer data. */
@media screen {
 body[data-cd-mobile="true"]{
  --cd-app-ink:#183c35;--cd-app-muted:#60756c;--cd-app-paper:#f6f7f3;
  --cd-app-line:#dfe6df;--cd-app-radius:16px;
  -webkit-font-smoothing:antialiased;
 }
 body[data-cd-mobile="true"] :is(a,button,input,select,textarea):focus-visible{
  outline:2px solid #9a7b43;outline-offset:4px;
 }
 body[data-cd-mobile="true"] #header.cd-site-header{
  background:#112e29!important;border-bottom:1px solid #ffffff1a!important;
 }
 body[data-cd-mobile="true"] #header.cd-site-header :is(.cd-header-login,.cd-mobile-menu){
  border:1px solid #ffffff40!important;border-radius:10px!important;
  background:transparent!important;color:#fff!important;font-size:13px!important;
 }
 body[data-cd-mobile="true"] #header.cd-site-header .cd-header-login{background:#ffffff12!important}
 body[data-cd-mobile="true"].customer-auth{background:var(--cd-app-paper)}
 body[data-cd-mobile="true"].customer-auth .auth-content{
  border:1px solid var(--cd-app-line);border-radius:20px;background:#fff;
  box-shadow:0 8px 30px #183c3505;
 }
 body[data-cd-mobile="true"].customer-auth .auth-tabs{gap:8px;padding:5px;background:#f0f3ed;border:0;border-radius:12px}
 body[data-cd-mobile="true"].customer-auth .auth-tabs a{
  flex:1;display:flex;align-items:center;justify-content:center;padding:10px;border:0;border-radius:9px;
 }
 body[data-cd-mobile="true"].customer-auth .auth-tabs [aria-current]{background:#fff;color:var(--cd-app-ink);box-shadow:0 2px 6px #183c3509}
 body[data-cd-mobile="true"].customer-auth #customer-password-form input:not([type=checkbox]){
  height:54px;border-radius:10px;font-size:16px;background:#fafbf8;border-color:var(--cd-app-line);
 }
 body[data-cd-mobile="true"].customer-auth .password-field button{height:54px;min-width:44px}
 body[data-cd-mobile="true"].customer-auth :is(.auth-submit,.social){min-height:52px;border-radius:11px}
 body[data-cd-mobile="true"].customer-auth .auth-submit{background:#183c35;font-size:15px;font-weight:600}
 body[data-cd-mobile="true"].customer-auth :is(.sub,.availability,.switch){color:#60756c}
 body[data-cd-mobile="true"].cd-mypage,body[data-cd-mobile="true"].cd-mypage .my-shell{background:var(--cd-app-paper);color:var(--cd-app-ink)}
 body[data-cd-mobile="true"].cd-mypage .my-topbar{background:transparent;border-color:var(--cd-app-line)}
 body[data-cd-mobile="true"].cd-mypage :is(.my-state,.my-card){background:#fff;border:1px solid var(--cd-app-line);border-radius:var(--cd-app-radius);box-shadow:none}
 body[data-cd-mobile="true"].cd-mypage .my-welcome{background:transparent;color:var(--cd-app-ink)}
 body[data-cd-mobile="true"].cd-mypage .my-welcome h2{color:var(--cd-app-ink)}
 body[data-cd-mobile="true"].cd-mypage :is(.my-state a,.my-welcome-account>a){background:var(--cd-app-ink);color:#fff;border-radius:10px;min-height:48px}
 body[data-cd-mobile="true"].cd-mypage :is(.my-empty,.my-journey){background:#edf2ec;border-radius:12px}
 body[data-cd-mobile="true"].cd-mypage .my-status{background:#e7f0e9;color:#265b48!important}
 body[data-cd-mobile="true"] .showroom .search{border:1px solid var(--cd-app-line);background:#f7f9f5;border-radius:12px;min-height:52px}
 body[data-cd-mobile="true"] .showroom .search input{font-size:16px}
 body[data-cd-mobile="true"] .showroom .brand-tab{border-radius:12px}
 body[data-cd-mobile="true"] .showroom .brand-tab.active{background:#edf3ed;color:var(--cd-app-ink)}
 body[data-cd-mobile="true"] .showroom .vehicle{border:1px solid var(--cd-app-line);border-radius:var(--cd-app-radius);padding:0;background:#fff;overflow:hidden}
 body[data-cd-mobile="true"] .showroom .vehicle-photo{border-radius:0;background:#f5f6f2}
 body[data-cd-mobile="true"] .showroom .vehicle-copy{padding:18px}
 body[data-cd-mobile="true"] .showroom .vehicle-bottom{border-top:1px solid #edf0ea;margin-top:16px;padding-top:14px}
 body[data-cd-mobile="true"] .showroom .quote-label{color:var(--cd-app-ink);font-weight:600}
}
@media screen and (max-width:768px){
 body[data-cd-mobile="true"] #header.cd-site-header .cd-header-inner{width:calc(100% - 40px)!important;gap:8px!important}
 body[data-cd-mobile="true"].customer-auth .auth-header{padding-inline:24px;border-color:var(--cd-app-line)}
 body[data-cd-mobile="true"].customer-auth .auth-layout{width:calc(100% - 32px);margin:24px auto 32px}
 body[data-cd-mobile="true"].customer-auth .auth-content{padding:24px 22px 28px}
 body[data-cd-mobile="true"].customer-auth .auth-content h2{font-size:27px;line-height:1.4;letter-spacing:-.04em}
 body[data-cd-mobile="true"].customer-auth .sub{font-size:14px;margin-bottom:28px}
 body[data-cd-mobile="true"].customer-auth .socials{grid-template-columns:1fr;gap:10px}
 body[data-cd-mobile="true"].customer-auth .social{font-size:14px!important}
 body[data-cd-mobile="true"].customer-auth .auth-policy{font-size:11px;line-height:1.9}
 body[data-cd-mobile="true"].cd-mypage .my-main{padding:24px 20px 48px}
 body[data-cd-mobile="true"].cd-mypage .my-state{padding:40px 24px;text-align:left}
 body[data-cd-mobile="true"].cd-mypage .my-state strong{font-size:24px;letter-spacing:-.04em}
 body[data-cd-mobile="true"].cd-mypage .my-state p{font-size:14px;line-height:1.8;color:var(--cd-app-muted)}
 body[data-cd-mobile="true"].cd-mypage .my-state a{display:flex;justify-content:center;margin-top:24px}
 body[data-cd-mobile="true"].cd-mypage .my-card{padding:22px 18px;margin-bottom:16px}
 body[data-cd-mobile="true"].cd-mypage .my-card-head h3{font-size:21px;color:var(--cd-app-ink)}
 body[data-cd-mobile="true"].cd-homepage #brands{background:var(--cd-app-paper);padding-block:40px}
 body[data-cd-mobile="true"].cd-homepage #brands .v19-brands{gap:12px}
 body[data-cd-mobile="true"].cd-homepage #brands .v19-brand{
  min-height:170px;padding:24px 16px;border:1px solid var(--cd-app-line);border-radius:16px;background:#fff;
 }
 body[data-cd-mobile="true"].cd-homepage #brands .v19-head{gap:16px;margin-bottom:24px}
 body[data-cd-mobile="true"] .showroom .vehicles{gap:18px}
 body[data-cd-mobile="true"] .showroom .brand-selector{gap:8px;border-bottom:0}
 body[data-cd-mobile="true"] .showroom .brand-tab{padding:14px 8px}
 body[data-cd-mobile="true"] .showroom .filters{gap:6px}
 body[data-cd-mobile="true"] .showroom .filter{padding:8px 14px;border-radius:999px;background:#f2f5ef}
 body[data-cd-mobile="true"] .showroom .filter.active{background:var(--cd-app-ink);color:#fff}
 body[data-cd-mobile="true"] .showroom .filter:after{display:none}
}
@media screen and (max-width:768px){
 /* Keep both existing contact actions, but use one quiet bottom row on home. */
 body[data-cd-mobile="true"].cd-homepage .cd-side-assistant{
  left:16px;right:16px;bottom:calc(12px + env(safe-area-inset-bottom,0px));width:auto;
 }
 body[data-cd-mobile="true"].cd-homepage .cd-side-contacts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 body[data-cd-mobile="true"].cd-homepage .cd-side-contacts .contact-action{height:56px;border-radius:12px;padding:8px 12px}
 body[data-cd-mobile="true"].cd-homepage .cd-side-contacts .contact-action.call{background:#183c35;border-color:#183c35}
 body[data-cd-mobile="true"].cd-homepage .cd-side-contacts .contact-icon{width:26px;height:26px;flex-basis:26px}
 body[data-cd-mobile="true"].cd-homepage .cd-side-contacts .contact-copy small{font-size:9px!important}
 body[data-cd-mobile="true"].cd-homepage .backtop{bottom:calc(80px + env(safe-area-inset-bottom,0px))}
}
