/* JobLik 0.33.94
   Robust mobile fixed CTA bar for /automotive/gallery.
   Uses JS to switch from normal flow to viewport-fixed mode because CSS sticky
   is unreliable inside the current public-page container stack. Desktop untouched. */

.agi-global-mobile-sticky-spacer{display:none}

@media (max-width:767px){
  .automotive-gallery-only .agi-global-mobile-sticky{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:8px!important;
    position:relative!important;
    inset:auto!important;
    z-index:120!important;
    width:100%!important;
    max-width:none!important;
    margin:0 0 10px!important;
    padding:8px 10px!important;
    background:rgba(247,250,253,.98)!important;
    border-top:1px solid rgba(255,121,0,.20)!important;
    border-bottom:1px solid rgba(255,121,0,.55)!important;
    box-shadow:0 4px 12px rgba(16,41,61,.08)!important;
    backdrop-filter:blur(8px)!important;
    -webkit-backdrop-filter:blur(8px)!important;
    box-sizing:border-box!important;
  }

  /* JS-controlled state: independent of all ancestor overflow/transform rules. */
  .automotive-gallery-only .agi-global-mobile-sticky.is-viewport-fixed{
    position:fixed!important;
    top:0!important;
    right:0!important;
    left:0!important;
    bottom:auto!important;
    width:100vw!important;
    margin:0!important;
    padding:8px max(10px,env(safe-area-inset-right)) 8px max(10px,env(safe-area-inset-left))!important;
    z-index:2147480000!important;
    box-shadow:0 5px 18px rgba(16,41,61,.18)!important;
  }

  .agi-global-mobile-sticky-spacer.is-active{
    display:block!important;
    width:100%!important;
    min-height:56px!important;
    margin:0 0 10px!important;
  }

  .automotive-gallery-only .agi-global-mobile-action{
    height:40px!important;
    min-width:0!important;
    margin:0!important;
    padding:0 8px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    background:#fff!important;
    border:1px solid #ef9a42!important;
    border-radius:10px!important;
    color:#df6b00!important;
    font-family:inherit!important;
    font-size:12px!important;
    font-weight:900!important;
    line-height:1!important;
    text-decoration:none!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;
  }

  /* Prevent a fixed bar from obscuring the first card when the page jumps to gallery content. */
  .automotive-gallery-only .v064-cars-row{scroll-margin-top:62px!important}

  /* Empty direct gallery must terminate in the light gallery surface, not the dark global footer. */
  html.joblik-global-gallery-empty body>footer,
  html.joblik-global-gallery-empty footer,
  html.joblik-global-gallery-empty [class*="site-footer"],
  html.joblik-global-gallery-empty [class*="public-footer"],
  html.joblik-global-gallery-empty [class*="v064-footer"],
  html.joblik-global-gallery-empty [id*="footer"],
  html.joblik-global-gallery-empty [data-site-footer]{
    display:none!important;
  }
  html.joblik-global-gallery-empty .automotive-gallery-only .v064-cars-row{
    min-height:0!important;
    padding-bottom:16px!important;
    margin-bottom:0!important;
  }
}

@media (min-width:768px){
  .agi-global-mobile-sticky,
  .agi-global-mobile-sticky-spacer{display:none!important}
}
