/**
 * SCPWOO Front-end Styles
 */

/* Cart shipping calculator — neighborhood field hidden until populated */
#calc_shipping_neighborhood_field {
  display: none;
}

/*
 * Degraded mode fallback: when JS fails to load, show hidden text inputs
 * that sit alongside the selects. JS removes these on successful init.
 */
.scpwoo-noscript-fallback {
  display: none;
}
.no-js .scpwoo-noscript-fallback,
noscript + .scpwoo-noscript-fallback {
  display: block;
}
/* The .scpwoo-noscript-fallback text inputs these rules assume are never actually
   rendered by PHP, so hiding the selects without JS left the customer with no city
   or neighborhood field at all — and no way to order. */

/* Auto-hide country field when store sells to a single supported country */
.scpwoo-country-single {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

/* Phase 2 (JS): once cascade has initialised, switch to display:none */
.scpwoo-field-hidden {
  display: none !important;
}

/* ── Cascade select loading state ── */

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

.woocommerce-input-wrapper.scpwoo-cascade-loading {
  position: relative;
}

.woocommerce-input-wrapper.scpwoo-cascade-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: scpwoo-spin 0.7s linear infinite;
  pointer-events: none;
}


