/* VirtueMart add-to-cart confirmation: keep the AJAX dialog compact. */
#fancybox-wrap:has(#fancybox-content .continue_link + .showcart){
  position:fixed!important;
  top:50%!important;
  left:50%!important;
  box-sizing:border-box!important;
  width:min(680px,calc(100vw - 32px))!important;
  height:auto!important;
  margin:0!important;
  transform:translate(-50%,-50%)!important;
}
#fancybox-wrap:has(#fancybox-content .continue_link + .showcart) #fancybox-outer,
#fancybox-wrap:has(#fancybox-content .continue_link + .showcart) #fancybox-content{
  box-sizing:border-box!important;
  width:100%!important;
  height:auto!important;
}
#fancybox-wrap:has(#fancybox-content .continue_link + .showcart) #fancybox-content{
  max-height:calc(100vh - 40px)!important;
  overflow:auto!important;
  border:0!important;
  border-radius:14px;
  background:#fff;
}
#fancybox-wrap:has(#fancybox-content .continue_link + .showcart) #fancybox-content>div{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  padding:20px!important;
  overflow:visible!important;
}
#fancybox-wrap:has(#fancybox-content .continue_link + .showcart) .continue_link,
#fancybox-wrap:has(#fancybox-content .continue_link + .showcart) .showcart{
  box-sizing:border-box;
  display:flex;
  float:none!important;
  width:100%;
  margin:0!important;
  justify-content:center;
}
#fancybox-wrap:has(#fancybox-content .continue_link + .showcart) .product-related-products{
  display:none!important;
}
#fancybox-wrap:has(#fancybox-content .continue_link + .showcart) h4{
  grid-column:1/-1;
  margin:0;
  color:#07536e;
  font-size:clamp(18px,2vw,23px);
  line-height:1.35;
}

@media(max-width:600px){
  #fancybox-wrap:has(#fancybox-content .continue_link + .showcart){
    width:calc(100vw - 20px)!important;
  }
  #fancybox-wrap:has(#fancybox-content .continue_link + .showcart) #fancybox-content>div{
    grid-template-columns:minmax(0,1fr);
    padding:14px!important;
  }
  #fancybox-wrap:has(#fancybox-content .continue_link + .showcart) .continue_link,
  #fancybox-wrap:has(#fancybox-content .continue_link + .showcart) .showcart{
    box-sizing:border-box;
    margin:0 0 10px!important;
  }
  #fancybox-wrap:has(#fancybox-content .continue_link + .showcart) h4{
    grid-column:1;
    margin-top:8px;
  }
}
