/**
 * CC_mp_atc_ux — PENDIENTE DE APROBAR. No está en el servidor.
 * Estados del botón Add to cart. El corte diagonal (skew) y el negro #111
 * se mantienen: el spinner de WooCommerce usa el mismo ::after y lo pisa.
 */

.cc-atc-spin {
  display: none;
  width: 12px;
  height: 12px;
  margin: 0 8px 0 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  flex: 0 0 auto;
  box-sizing: border-box;
}

.cc-atc-label {
  position: relative;
  z-index: 1;
}

button.single_add_to_cart_button.cc-atc-busy,
button.single_add_to_cart_button.cc-atc-added,
a.ajax_add_to_cart.cc-atc-busy,
a.ajax_add_to_cart.cc-atc-added,
button.cc-bar__btn.cc-atc-busy,
button.cc-bar__btn.cc-atc-added {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;
  color: #fff !important;
  cursor: progress;
}

/* Woo añade padding-right para su glifo. Sin eso el texto se desplaza. */
ul.products li.product a.ajax_add_to_cart.loading.cc-atc-busy,
ul.products li.product a.ajax_add_to_cart.added.cc-atc-added {
  padding-right: 18px !important;
}

button.single_add_to_cart_button.cc-atc-busy,
a.ajax_add_to_cart.cc-atc-busy,
button.cc-bar__btn.cc-atc-busy {
  pointer-events: none;
}

.cc-atc-busy .cc-atc-spin,
.cc-atc-added .cc-atc-spin {
  position: relative;
  z-index: 1;
}

.cc-atc-busy .cc-atc-spin {
  display: inline-block;
  animation: cc-atc-spin 0.7s linear infinite;
}

.cc-atc-added .cc-atc-spin {
  display: none;
}

/* El ::after del tema es el fondo negro sesgado. Woo lo sustituye en
   .loading / .added por un glifo de su icon font, que aquí no se dibuja
   y deja el botón rojo con un cuadrado negro en el texto. */
.woocommerce a.button.loading.cc-atc-busy::after,
.woocommerce a.button.added.cc-atc-busy::after,
.woocommerce a.button.added.cc-atc-added::after,
a.ajax_add_to_cart.loading::after,
a.ajax_add_to_cart.added::after,
button.single_add_to_cart_button.cc-atc-busy::after,
button.single_add_to_cart_button.cc-atc-added::after,
button.cc-bar__btn.cc-atc-busy::after,
button.cc-bar__btn.cc-atc-added::after {
  content: "" !important;
  font-family: inherit !important;
  animation: none !important;
  position: absolute !important;
  top: 0 !important;
  right: auto !important;
  bottom: auto !important;
  left: 0 !important;
  z-index: -1 !important;
  width: calc(100% - 2px) !important;
  height: calc(100% - 2px) !important;
  margin: 0 !important;
  background-color: #111 !important;
  transform: skewX(-10deg) scaleX(0.955) !important;
  transform-origin: bottom left !important;
  border-radius: 3px !important;
  opacity: 1 !important;
}

.cc-atc-note {
  flex-basis: 100%;
  width: 100%;
  margin: 10px 0 0;
  color: #111;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.cc-atc-note[hidden] {
  display: none !important;
}

.cc-atc-live {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

@keyframes cc-atc-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-atc-busy .cc-atc-spin {
    animation: none;
    border-color: #fff;
    border-top-color: #fff;
  }
}
