/* ══════════════════════════════════════════════════════
   WC Request Order Popup — Styles v2.0
   ══════════════════════════════════════════════════════ */

/* ── Back button on cart page ─────────────────────── */
.wc-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  padding: 10px 18px;
  background: #f3f4f6;
  color: #374151;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.wc-back-btn:hover {
  background: #7c3aed;
  color: #fff;
}

/* ── Toast notification ───────────────────────────── */
#wc-toast {
  display: none;
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #059669;
  color: #fff;
  padding: 16px 28px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Segoe UI', system-ui, sans-serif;
  box-shadow: 0 8px 30px rgba(5,150,105,0.35);
  z-index: 999999;
  white-space: nowrap;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.35s;
  opacity: 0;
}
#wc-toast.show {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#wc-toast .toast-icon { margin-right: 8px; }

/* ── Overlay ──────────────────────────────────────── */
#wc-email-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}
#wc-email-overlay.active { display: flex; animation: overlayIn 0.25s ease; }

@keyframes overlayIn { from { opacity:0; } to { opacity:1; } }

/* ── Popup box ────────────────────────────────────── */
#wc-email-popup {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  position: relative;
  animation: popupIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
  font-family: 'Segoe UI', system-ui, sans-serif;
}
@keyframes popupIn {
  from { transform: translateY(24px) scale(0.96); opacity:0; }
  to   { transform: translateY(0)    scale(1);    opacity:1; }
}

#wc-email-popup .popup-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg,#7c3aed,#a855f7);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; font-size: 26px;
}
#wc-email-popup h2 {
  font-size: 1.4rem; font-weight: 700; color: #111827;
  margin: 0 0 6px; line-height: 1.3;
}
#wc-email-popup p.subtitle {
  font-size: 0.9rem; color: #6b7280; margin: 0 0 20px;
}

/* ── Cart preview ─────────────────────────────────── */
#wc-cart-preview {
  background: #f9f7ff;
  border: 1px solid #ede9fe;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  max-height: 140px;
  overflow-y: auto;
}
#wc-cart-preview .cart-row {
  display: flex; justify-content: space-between;
  font-size: 0.83rem; color: #374151; padding: 3px 0;
}

/* ── Form elements ────────────────────────────────── */
#wc-email-popup label {
  display: block; font-size: 0.8rem; font-weight: 600;
  color: #374151; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 8px;
}
#wc-popup-email-input {
  width: 100%; padding: 13px 16px;
  border: 2px solid #e5e7eb; border-radius: 10px;
  font-size: 1rem; color: #111827; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
#wc-popup-email-input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 4px rgba(124,58,237,0.12);
}
#wc-popup-error {
  font-size: 0.82rem; color: #dc2626;
  margin-top: 6px; min-height: 18px; display: block;
}

/* ── Submit button ────────────────────────────────── */
#wc-popup-submit {
  width: 100%; margin-top: 20px; padding: 14px;
  background: linear-gradient(135deg,#7c3aed,#a855f7);
  color: #fff; border: none; border-radius: 10px;
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 4px 16px rgba(124,58,237,0.35);
}
#wc-popup-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(124,58,237,0.4);
}
#wc-popup-submit:disabled { opacity: 0.7; cursor: not-allowed; }
#wc-popup-submit .btn-text   { display: inline; }
#wc-popup-submit .btn-loader { display: none; }
#wc-popup-submit.loading .btn-text   { display: none; }
#wc-popup-submit.loading .btn-loader { display: inline; }

.btn-loader::after {
  content: '';
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Close button ─────────────────────────────────── */
#wc-popup-close {
  position: absolute; top: 14px; right: 16px;
  background: #f3f4f6; border: none; border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; color: #6b7280;
  transition: background 0.15s, color 0.15s;
  line-height: 1; padding: 0;
}
#wc-popup-close:hover { background: #fee2e2; color: #dc2626; }

/* ── Mobile ───────────────────────────────────────── */
@media (max-width: 480px) {
  #wc-email-popup { margin: 16px; padding: 28px 20px 24px; }
  #wc-toast { font-size: 0.88rem; padding: 14px 20px; white-space: normal; text-align:center; }
}
