/* Product restriction (CSS-only) */

/* Add blur to core product columns when body has marker class */
.snd-restricted-product .woocommerce-product-gallery,
.snd-restricted-product .summary.entry-summary {
  filter: blur(16px);
  pointer-events: none;
  user-select: none;
}

/* Shop/archive: mark product cards and overlay */
/* Prefer blurring only the image area; keep title/price visible if desired */
.products .product.snd-restricted-product .woocommerce-LoopProduct-link img,
.products .product.snd-restricted-product .woocommerce-loop-product__link img,
.products .product.snd-restricted-product img {
  filter: blur(35px) brightness(0.8);
}

.products .product.snd-restricted-product {
  position: relative;
}

/* Overlay container rendered via PHP hook */
.products .product.snd-restricted-product .snd-shop-restriction-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.5));
  color: #fff;
  padding: 0.75rem;
  z-index: 10;
  border-radius: inherit;
  pointer-events: auto;
}

.products .product.snd-restricted-product .snd-shop-restriction-inner {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: center;
  background: rgba(17, 17, 17, 0.55);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  backdrop-filter: blur(8px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  max-width: 85%;
  pointer-events: auto;
}

.products .product.snd-restricted-product .snd-shop-restriction-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 2px;
}

.products .product.snd-restricted-product .snd-shop-restriction-actions .button {
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 6px;
  line-height: 1.2;
  font-weight: 600;
  transition: all .15s ease-in-out;
  text-decoration: none;
  box-shadow: none;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  transform: none;
  pointer-events: auto;
}

/* Harmonize button styles on cover overlay */
.products .product.snd-restricted-product .snd-register-btn {
  background: linear-gradient(180deg, #0ea5e9, #0284c7);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
}
.products .product.snd-restricted-product .snd-register-btn:hover {
  filter: brightness(1.05);
}
.products .product.snd-restricted-product .snd-login-btn {
  background: rgba(255,255,255,0.9);
  color: #111;
  border: 1px solid rgba(0,0,0,.08);
}
.products .product.snd-restricted-product .snd-login-btn:hover {
  background: #fff;
}

/* Focus states for accessibility */
.products .product.snd-restricted-product .snd-shop-restriction-actions .button:focus {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

/* Typography tweak */
.products .product.snd-restricted-product .snd-shop-restriction-inner strong {
  font-weight: 700;
  letter-spacing: .2px;
  margin-bottom: 4px;
}

/* Fullscreen overlay prompting login/register */
.snd-restriction-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.snd-restriction-content {
  background: #fff;
  padding: 2rem;
  margin: 0 !important;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.snd-restriction-header h2 {
  margin: 0 0 0.75rem 0;
  color: #111;
  font-size: 1.5rem;
}

.snd-restriction-header p {
  margin: 0 0 1.25rem 0;
  color: #444;
  font-size: 1rem;
  line-height: 1.5;
}

.snd-restriction-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.snd-restriction-actions .button {
  padding: 12px 18px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.snd-register-btn {
  background: #007cba;
  color: #fff;
}

.snd-register-btn:hover {
  background: #005a87;
  color: #fff;
}

.snd-login-btn {
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
}

.snd-login-btn:hover {
  background: #e0e0e0;
  color: #333;
}

@media (max-width: 480px) {
  .snd-restriction-actions { flex-direction: column; }
  .snd-restriction-actions .button { width: 100%; }
  .products .product.snd-restricted-product .snd-shop-restriction-actions { flex-direction: column; }
  .products .product.snd-restricted-product .snd-shop-restriction-actions .button { width: 100%; }
}
