/* Gooey pill button (motion kit). Adapted from Simey's "Gooey button" (svg filter from Ana Tudor).
   Colours match Savi's existing buttons (homepage page 6, widgets eb9adbc "SHOP" and 87bbb3e "Explore"):
     m-goo               filled:      bg #F3763A, text #FFF, 1px border #F3763A
     m-goo m-goo-outline transparent: bg none,    text #FFF, 1px border #FFF
     hover (both):       bg #FFF, text #F3763A, 1px border #F3763A
   Usage in Elementor: Button widget > Advanced > CSS Classes. Optional m-goo-intro on one hero button.
   Also works on WooCommerce's Add to cart button: m-goo on the Add to cart widget (shop product page, 2026-10-14).
   The 1px border is drawn inside the SVG filter so it follows the gooey shape (see gooey.js). */

@property --goo-a { syntax: "<percentage>"; initial-value: 0%; inherits: true; }
@property --goo-body { syntax: "<color>"; initial-value: #F3763A; inherits: true; }
@property --goo-glow { syntax: "<color>"; initial-value: #F3763A; inherits: true; }

:root {
  --goo-orange: #F3763A;
  --goo-white: #FFFFFF;
  --goo-spring: linear(
    0, 0.002, 0.01 0.9%, 0.038 1.8%, 0.156, 0.312 5.8%, 0.789 11.1%, 1.015 14.2%,
    1.096, 1.157, 1.199, 1.224 20.3%, 1.231, 1.231, 1.226, 1.214 24.6%,
    1.176 26.9%, 1.057 32.6%, 1.007 35.5%, 0.984, 0.968, 0.956, 0.949 42%,
    0.946 44.1%, 0.95 46.5%, 0.998 57.2%, 1.007, 1.011 63.3%, 1.012 68.3%,
    0.998 84%, 1
  );
}

.m-goo :is(.elementor-button, .single_add_to_cart_button, .add_to_cart_button),
.elementor-button.m-goo {
  --goo-x: 50;
  --goo-y: 50;
  --goo-pad: 22px;
  --goo-body: var(--goo-orange);
  --goo-ink: var(--goo-white);
  --goo-fade: .35s;
  /* edge leak when the bulge stretches: Savi orange mixed into the white bulge.
     22% = same perceptual difference (deltaE ~15) as the original pen's body -> glow colours */
  --goo-tint: 22%;
  --goo-glow: var(--goo-body);

  position: relative;
  isolation: isolate;
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: var(--goo-ink) !important;
  scale: 0.95;
  transform-origin: 50% 50%;   /* grows and shrinks from its centre (2026-10-14, Majd; was the left edge, so hover grew rightwards) */
  transition: --goo-a .5s ease-in-out, --goo-body var(--goo-fade) ease, --goo-glow var(--goo-fade) ease, color var(--goo-fade) ease, scale 1.66s var(--goo-spring);
  -webkit-tap-highlight-color: transparent;
}
.m-goo :is(.elementor-button, .single_add_to_cart_button, .add_to_cart_button) .elementor-button-text,
.elementor-button.m-goo :is(.elementor-button, .single_add_to_cart_button, .add_to_cart_button)-text { color: var(--goo-ink) !important; transition: color var(--goo-fade) ease; }

/* transparent version: two stacked layers cross-fade (white ring -> filled white with orange ring) */
.m-goo-outline .elementor-button, .elementor-button.m-goo-outline {
  --goo-body: var(--goo-white);
}

/* cream version, for orange backgrounds where the filled orange button disappears: cream body, orange text.
   Hover is the same as the others (white body). Usage: m-goo m-goo-cream */
.m-goo-cream .elementor-button, .elementor-button.m-goo-cream, .m-goo-cream .single_add_to_cart_button {
  --goo-body: #FBF4EC;
  --goo-ink: var(--goo-orange);
}

/* hover (both versions): white body, orange text, orange ring.
   Touch screens have no hover: gooey.js adds m-goo-on while a finger presses the button, and real :hover is
   limited to hover devices so a tapped button doesn't stay white ("sticky hover" on phones). */
.m-goo :is(.elementor-button, .single_add_to_cart_button, .add_to_cart_button):is(:focus-visible:not(.m-goo-quiet), .m-goo-on),
.elementor-button.m-goo:is(:focus-visible:not(.m-goo-quiet), .m-goo-on) {
  --goo-a: 100%;
  --goo-body: var(--goo-white);
  --goo-glow: color-mix(in srgb, var(--goo-orange) var(--goo-tint), var(--goo-white));
  --goo-ink: var(--goo-orange);
  scale: 1;
  transition-duration: .5s, var(--goo-fade), var(--goo-fade), var(--goo-fade), 1s;
}
@media (hover: hover) {
  .m-goo :is(.elementor-button, .single_add_to_cart_button, .add_to_cart_button):hover,
  .elementor-button.m-goo:hover {
    --goo-a: 100%;
    --goo-body: var(--goo-white);
    --goo-glow: color-mix(in srgb, var(--goo-orange) var(--goo-tint), var(--goo-white));
    --goo-ink: var(--goo-orange);
    scale: 1;
    transition-duration: .5s, var(--goo-fade), var(--goo-fade), var(--goo-fade), 1s;
  }
}
.m-goo :is(.elementor-button, .single_add_to_cart_button, .add_to_cart_button):focus-visible:not(.m-goo-quiet) { outline: 2px solid var(--goo-orange); outline-offset: 8px; }
.m-goo :is(.elementor-button, .single_add_to_cart_button, .add_to_cart_button).m-goo-quiet, .elementor-button.m-goo.m-goo-quiet { outline: none; }

.m-goo :is(.elementor-button, .single_add_to_cart_button, .add_to_cart_button)::before, .elementor-button.m-goo::before,
.m-goo-outline .elementor-button::after, .elementor-button.m-goo-outline::after {
  content: "";
  position: absolute;
  /* the solid body fills exactly the button box; the glow can bulge out by --goo-pad */
  inset: calc(var(--goo-pad) * -1);
  padding: var(--goo-pad);
  z-index: -1;
  border-radius: 999px;
  background-image:
    linear-gradient(var(--goo-body), var(--goo-body)),
    radial-gradient(42% 72% at calc(var(--goo-x) * 1%) calc(var(--goo-y) * 1%),
      color-mix(in srgb, var(--goo-glow) var(--goo-a), transparent) 0%, transparent 90%);
  background-clip: content-box, border-box;
  transition: opacity var(--goo-fade) ease;
}
/* filled layer: body + 1px orange ring (orange ring is invisible on the orange body) */
.m-goo :is(.elementor-button, .single_add_to_cart_button, .add_to_cart_button)::before, .elementor-button.m-goo::before { filter: blur(12px) url(#m-goo-ring-orange); }
/* ring-only layer, transparent version */
.m-goo-outline .elementor-button::after, .elementor-button.m-goo-outline::after { filter: blur(12px) url(#m-goo-ring-white); }
/* touch screens: no bulge to animate, and iPhone Safari sometimes skips the SVG half of the filter on buttons painted before
   gooey.js adds it, leaving only the blur (blurry Add to cart on the first shop cards, Majd 2026-10-31). Filled layer drawn
   plain; the outline buttons keep their filter, it draws their ring. */
@media (hover: none) {
  .m-goo :is(.elementor-button, .single_add_to_cart_button, .add_to_cart_button)::before, .elementor-button.m-goo::before { filter: none; }
}

.m-goo-outline .elementor-button::before, .elementor-button.m-goo-outline::before { opacity: 0; }
.m-goo-outline .elementor-button:is(:focus-visible:not(.m-goo-quiet), .m-goo-on)::before,
.elementor-button.m-goo-outline:is(:focus-visible:not(.m-goo-quiet), .m-goo-on)::before { opacity: 1; }
.m-goo-outline .elementor-button:is(:focus-visible:not(.m-goo-quiet), .m-goo-on)::after,
.elementor-button.m-goo-outline:is(:focus-visible:not(.m-goo-quiet), .m-goo-on)::after { opacity: 0; }
@media (hover: hover) {
  .m-goo-outline .elementor-button:hover::before, .elementor-button.m-goo-outline:hover::before { opacity: 1; }
  .m-goo-outline .elementor-button:hover::after, .elementor-button.m-goo-outline:hover::after { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .m-goo :is(.elementor-button, .single_add_to_cart_button, .add_to_cart_button), .elementor-button.m-goo { transition: none; scale: 1; }
}
