/**
 * HangNgoaiShop 3.9.55.71.8.4 — Commerce Controls Final Lock
 * Scope: CheckoutWC Side Cart CTA hierarchy + floating utility collision safety.
 * No header glyph/font, checkout layout, cart math, shipping or payment logic changes.
 */

/* Side Cart: one clear primary action. Catch both CheckoutWC and WooCommerce-injected buttons. */
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
}
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout a,
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout button{
  min-height:46px!important;
  margin:0!important;
  border-radius:5px!important;
  box-shadow:none!important;
  background-image:none!important;
}

/* View Cart = secondary. Support absolute/relative Vietnamese + default WooCommerce URLs/classes. */
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout a.button.wc-forward:not(.checkout),
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout a[href*="/gio-hang"],
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout a[href*="/cart"]{
  border:1px solid #dedbd8!important;
  background:#fff!important;
  background-color:#fff!important;
  color:#353439!important;
  -webkit-text-fill-color:#353439!important;
}
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout a.button.wc-forward:not(.checkout):hover,
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout a[href*="/gio-hang"]:hover,
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout a[href*="/cart"]:hover,
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout a.button.wc-forward:not(.checkout):focus-visible{
  border-color:#c9176b!important;
  background:#fff!important;
  color:#c9176b!important;
  -webkit-text-fill-color:#c9176b!important;
}

/* Checkout = primary. Kept after secondary rules deliberately. */
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout a.checkout,
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout a[href*="/thanh-toan"],
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout a[href*="/checkout"],
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout > a.cfw-primary-btn{
  border:1px solid #c9176b!important;
  background:#c9176b!important;
  background-color:#c9176b!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout a.checkout:hover,
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout a[href*="/thanh-toan"]:hover,
body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout a[href*="/checkout"]:hover{
  border-color:#a81258!important;
  background:#a81258!important;
  background-color:#a81258!important;
}

/* Side Cart is a focused commerce surface: floating utilities must never sit under the overlay/drawer. */
body.yhn-commerce-controls-final-39557184.cfw-side-cart-open .ft-chatbox,
body.yhn-commerce-controls-final-39557184.cfw-side-cart-open .hotline-phone-ring-wrap,
body.yhn-commerce-controls-final-39557184.cfw-side-cart-open .back-to-top,
body.yhn-commerce-controls-final-39557184.cfw-side-cart-open .button.icon.circle.back-to-top,
html.yhn-commerce-sidecart-open-39557184 .ft-chatbox,
html.yhn-commerce-sidecart-open-39557184 .hotline-phone-ring-wrap,
html.yhn-commerce-sidecart-open-39557184 .back-to-top,
html.yhn-commerce-sidecart-open-39557184 .button.icon.circle.back-to-top{
  display:none!important;
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

/* On phone Cart, the fixed chat bubble competes with quantity/totals/checkout controls.
   Hide it on this conversion step instead of allowing collisions. */
@media (max-width:849px){
  body.woocommerce-cart.yhn-commerce-controls-final-39557184 .ft-chatbox,
  body.woocommerce-cart.yhn-commerce-controls-final-39557184 .hotline-phone-ring-wrap{
    display:none!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }

  body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout a,
  body.yhn-commerce-controls-final-39557184 #cfw-side-cart .wc-proceed-to-checkout button{
    min-height:45px!important;
  }
}
