/* This bar contains the ORIGINAL WooCommerce form, not a copy. */
#gt-msc-bar { position:fixed; inset:auto 0 0; z-index:99990; display:none; background:var(--gt-msc-bg, var(--woocommerce-background-color, #fff)); color:inherit; padding:10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); box-shadow:0 -3px 15px rgba(0,0,0,.13); max-height:min(70dvh, 550px); overflow-x:hidden; overflow-y:auto; box-sizing:border-box; }
#gt-msc-bar.gt-msc-visible { display:block; }
#gt-msc-bar .gt-msc-inner { width:100%; margin:0 auto; }
#gt-msc-bar form.cart { margin:0!important; display:block; width:100%; }
#gt-msc-bar form.cart .variations { width:100%; margin-bottom:8px; }
#gt-msc-bar form.cart .variations select { max-width:100%; }
#gt-msc-bar form.cart .single_variation_wrap { margin-top:6px; }
#gt-msc-bar form.cart .woocommerce-variation-add-to-cart { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
#gt-msc-bar form.cart .quantity { float:none; margin:0; }
#gt-msc-bar form.cart .single_add_to_cart_button { float:none; }
#gt-msc-bar form.cart .woocommerce-variation-description { max-height:100px; overflow:auto; }
#gt-msc-bar form.cart .woocommerce-variation-availability { font-size:.9em; }
#gt-msc-bar form.cart .reset_variations { display:inline-block; }
#gt-msc-placeholder { display:block; width:100%; }
body.gt-msc-active { padding-bottom:var(--gt-msc-height, 100px)!important; }
@media (prefers-reduced-motion:reduce) { #gt-msc-bar * { scroll-behavior:auto!important; } }


/* v1.0.6: CSS-only Join.chat integration using its documented --bottom custom property.
   The working v1.0.1 sticky-bar visibility code is otherwise unchanged. */
body.gt-msc-active .joinchat {
  --bottom: calc(var(--gt-msc-height, 100px) + 12px) !important;
  z-index: 99991 !important;
}

/* Cosmetic layout for the existing WooCommerce controls. No cloned buttons. */
#gt-msc-bar .gt-msc-inner,
#gt-msc-bar form.cart,
#gt-msc-bar form.cart .single_variation_wrap {
  box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0;
}
#gt-msc-bar form.cart > .quantity,
#gt-msc-bar .gt-msc-action-parent > .quantity,
#gt-msc-bar .gt-msc-action-parent > .variations,
#gt-msc-bar .gt-msc-action-parent > .single_variation_wrap {
  box-sizing: border-box; flex: 0 0 100%; width: 100% !important;
  max-width: 100% !important; margin: 0 0 8px !important;
}
#gt-msc-bar form.cart .quantity input.qty {text-align:center!important;}
#gt-msc-bar .gt-msc-action-parent {
  display:flex!important; flex-wrap:wrap!important; align-items:stretch!important;
  justify-content:center!important; gap:8px!important;
}
#gt-msc-bar .gt-msc-action-parent > .gt-msc-action-button {
  box-sizing:border-box!important; display:inline-flex!important;
  align-items:center!important; justify-content:center!important;
  text-align:center!important; vertical-align:middle!important;
  flex:1 1 calc(50% - 4px)!important; width:calc(50% - 4px)!important;
  max-width:calc(50% - 4px)!important; min-width:0!important;
  float:none!important; margin:0!important; min-height:44px;
}
/* Fallback if buttons have distinct theme wrappers: center the original labels. */
#gt-msc-bar .gt-msc-action-button {text-align:center!important;}
