/* 
 * Version: 3.5.2
 * Date: 2025-08-22
 * Summary: Baseline full-screen modal styling (no rounded card); ATC appears only inside modal footer.
 */

/* lock background scroll while open */
body.woic-no-scroll { overflow: hidden; }

/* fullscreen backdrop */
.woic-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

/* fullscreen card */
.woic-modal-content {
  position: relative;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: #fff;
  overflow: hidden;
}

/* close button */
.woic-close {
  position: absolute;
  top: 12px;
  right: 50px;
  font-size: 50px;
  line-height: 1;
  cursor: pointer;
  color: #333;
  z-index: 1002;
  pointer-events: auto;
}

/* stage fills the viewport */
.woic-stage-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #f5f5f0;
  overflow: visible;
}

#woic-stage {
  width: 100%;
  height: 100%;
}

/* top controls */
.woic-input-container {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1003;
  background: rgba(255,255,255,.95);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

/* Hidden native input handled by JS */
#woic-upload{ display:none; }

/* Custom upload button styling */
.woic-upload-btn{
  background: #4f46e5; /* indigo-600 */
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}
.woic-upload-btn:hover{ background:#4338ca; }
.woic-upload-btn:active{ background:#3730a3; }

/* Filename next to button */
/* Filename hidden (we don't show it) */
.woic-upload-filename{ display:none; }

/* footer with qty + ATC */
.woic-cart-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1003;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center; /* centers items horizontally */
  background: rgba(255,255,255,.98);
  border-top: 1px solid #e5e7eb;
  padding: 10px 14px;
}

.woocommerce-page button[type=submit].single_add_to_cart_button {margin-top: 0;}

.woic-cart-actions .quantity { margin: 0; }

/* busy indicator */
.woic-busy {
  position: absolute;
  inset: 0;
  z-index: 1004;
  background: rgba(255,255,255,.65);
  display: none;
  align-items: center;
  justify-content: center;
}
.woic-busy-text {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.woic-busy.is-active { display: flex; }

.woic-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cfd2d7;
  border-top-color: #3b82f6;
  animation: woic-spin 0.8s linear infinite;
}
@keyframes woic-spin { to { transform: rotate(360deg); } }

/* hide native on-page ATC and qty so ATC lives in modal only */
.single-product div.product .summary > form.cart .single_add_to_cart_button,
.single-product div.product .summary > form.cart .quantity {
  display: none !important;
}
