/* ===== PoshWave — site-wide flow button effect ==========================
 *
 * Applies the product-card button animation to primary action buttons across
 * the site: gold gradient fill expanding from the centre, pill -> 12px radius
 * morph, on the site's own palette.
 *
 * The fill is sized from each button's own width (260% + aspect-ratio) and
 * animated with scale, so it always covers the full button no matter how wide
 * it is. A fixed pixel size leaves curved gaps on wide buttons.
 *
 * Scoped deliberately: the :not() list keeps the effect off icon buttons,
 * quantity steppers, remove links, and the shop UI's own controls, which are
 * either too small for it or already styled.
 */

:root{
  --pwb-g:#cd9824;
  --pwb-g-lt:#fbe472;
  --pwb-g-md:#f3ba35;
  --pwb-ink:#020202;
}

:is(
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  .woocommerce #respond input#submit,
  .woocommerce .single_add_to_cart_button,
  .woocommerce .checkout-button,
  .wc-proceed-to-checkout a.button,
  .wc-block-components-button,
  .wp-element-button,
  .elementor-button,
  .wpcf7-submit,
  button.pw-btnfx,
  a.pw-btnfx
):not(
  .pw-flow,
  .pw-opt,
  .pw-fil-apply,
  .pw-fil-mobile,
  .pw-fil-head,
  .pw-modal-add,
  .pw-modal-x,
  .pw-hdr-icobtn,
  .pw-sc-close,
  .plus,
  .minus,
  .remove,
  .remove_from_cart_button,
  .pw-match-add,
  .pw-no-fx
){
  position:relative;
  z-index:0;                 /* own stacking context so ::before stays inside */
  overflow:hidden;
  isolation:isolate;
  border:1.5px solid rgba(205,152,36,.55)!important;
  border-radius:100px!important;
  background:transparent!important;
  background-image:none!important;
  color:var(--pwb-ink)!important;
  box-shadow:none!important;
  text-decoration:none!important;
  transition:border-color 600ms cubic-bezier(.23,1,.32,1),
             color 600ms cubic-bezier(.23,1,.32,1),
             border-radius 600ms cubic-bezier(.23,1,.32,1);
}

:is(
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  .woocommerce #respond input#submit,
  .woocommerce .single_add_to_cart_button,
  .woocommerce .checkout-button,
  .wc-proceed-to-checkout a.button,
  .wc-block-components-button,
  .wp-element-button,
  .elementor-button,
  .wpcf7-submit,
  button.pw-btnfx,
  a.pw-btnfx
):not(
  .pw-flow,
  .pw-opt,
  .pw-fil-apply,
  .pw-fil-mobile,
  .pw-fil-head,
  .pw-modal-add,
  .pw-modal-x,
  .pw-hdr-icobtn,
  .pw-sc-close,
  .plus,
  .minus,
  .remove,
  .remove_from_cart_button,
  .pw-match-add,
  .pw-no-fx
)::before{
  content:'';
  position:absolute;
  top:50%;
  left:50%;
  width:260%;
  aspect-ratio:1/1;
  height:auto;
  border-radius:50%;
  z-index:-1;
  opacity:0;
  background:linear-gradient(135deg,var(--pwb-g-lt),var(--pwb-g-md) 48%,var(--pwb-g));
  transform:translate(-50%,-50%) scale(0);
  transition:transform 800ms cubic-bezier(.19,1,.22,1),
             opacity 380ms ease;
  pointer-events:none;
}

:is(
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  .woocommerce #respond input#submit,
  .woocommerce .single_add_to_cart_button,
  .woocommerce .checkout-button,
  .wc-proceed-to-checkout a.button,
  .wc-block-components-button,
  .wp-element-button,
  .elementor-button,
  .wpcf7-submit,
  button.pw-btnfx,
  a.pw-btnfx
):not(
  .pw-flow,
  .pw-opt,
  .pw-fil-apply,
  .pw-fil-mobile,
  .pw-fil-head,
  .pw-modal-add,
  .pw-modal-x,
  .pw-hdr-icobtn,
  .pw-sc-close,
  .plus,
  .minus,
  .remove,
  .remove_from_cart_button,
  .pw-match-add,
  .pw-no-fx
):hover{
  border-color:transparent!important;
  border-radius:12px!important;
  color:var(--pwb-ink)!important;
}

:is(
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  .woocommerce #respond input#submit,
  .woocommerce .single_add_to_cart_button,
  .woocommerce .checkout-button,
  .wc-proceed-to-checkout a.button,
  .wc-block-components-button,
  .wp-element-button,
  .elementor-button,
  .wpcf7-submit,
  button.pw-btnfx,
  a.pw-btnfx
):not(
  .pw-flow,
  .pw-opt,
  .pw-fil-apply,
  .pw-fil-mobile,
  .pw-fil-head,
  .pw-modal-add,
  .pw-modal-x,
  .pw-hdr-icobtn,
  .pw-sc-close,
  .plus,
  .minus,
  .remove,
  .remove_from_cart_button,
  .pw-match-add,
  .pw-no-fx
):hover::before{
  transform:translate(-50%,-50%) scale(1);
  opacity:1;
}

/* input elements cannot host ::before; give them the fill directly. */
input.wpcf7-submit,
.woocommerce input.button,
.woocommerce #respond input#submit{
  transition:background 600ms cubic-bezier(.23,1,.32,1),
             border-color 600ms cubic-bezier(.23,1,.32,1),
             color 600ms cubic-bezier(.23,1,.32,1),
             border-radius 600ms cubic-bezier(.23,1,.32,1)!important;
}
input.wpcf7-submit:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover{
  background:linear-gradient(135deg,var(--pwb-g-lt),var(--pwb-g-md) 48%,var(--pwb-g))!important;
}

/* Bare, class-less buttons that ship unstyled (browser default grey).
   #check_pincode on the product page is the only one on the site today. */
#check_pincode{
  position:relative;
  z-index:0;
  overflow:hidden;
  isolation:isolate;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:8px;
  padding:11px 26px;
  font-family:'Manrope',system-ui,sans-serif;
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  cursor:pointer;
  border:1.5px solid rgba(205,152,36,.55)!important;
  border-radius:100px!important;
  background:transparent!important;
  color:var(--pwb-ink)!important;
  transition:border-color 600ms cubic-bezier(.23,1,.32,1),
             color 600ms cubic-bezier(.23,1,.32,1),
             border-radius 600ms cubic-bezier(.23,1,.32,1);
}
#check_pincode::before{
  content:'';
  position:absolute;
  top:50%;
  left:50%;
  width:260%;
  aspect-ratio:1/1;
  height:auto;
  border-radius:50%;
  z-index:-1;
  opacity:0;
  background:linear-gradient(135deg,var(--pwb-g-lt),var(--pwb-g-md) 48%,var(--pwb-g));
  transform:translate(-50%,-50%) scale(0);
  transition:transform 800ms cubic-bezier(.19,1,.22,1),opacity 380ms ease;
  pointer-events:none;
}
#check_pincode:hover{
  border-color:transparent!important;
  border-radius:12px!important;
}
#check_pincode:hover::before{
  transform:translate(-50%,-50%) scale(1);
  opacity:1;
}

@media(prefers-reduced-motion:reduce){
  :is(.woocommerce a.button,.woocommerce button.button,.elementor-button,.wp-element-button,.wpcf7-submit)::before{
    transition-duration:.01ms!important;
  }
}
