/* ===== WC OTP Auth Popup Styles ===== */
:root {
  --otp-primary: #7c3aed;
  --otp-primary-dark: #5b21b6;
  --otp-accent: #4f46e5;
  --otp-success: #22c55e;
  --otp-error: #ef4444;
  --otp-warn: #f59e0b;
  --otp-bg: #ffffff;
  --otp-surface: #f8f7ff;
  --otp-border: #e5e7eb;
  --otp-text: #1f2937;
  --otp-muted: #6b7280;
  --otp-radius: 16px;
  --otp-shadow: 0 25px 60px rgba(124,58,237,0.18), 0 8px 20px rgba(0,0,0,0.1);
  --otp-transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ---- Overlay ---- */
.wc-otp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,12,41,0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.wc-otp-overlay:not([hidden]) { opacity: 1; }
.wc-otp-overlay[hidden] { display: none !important; }

/* ---- Popup ---- */
.wc-otp-popup {
  background: var(--otp-bg);
  border-radius: var(--otp-radius);
  box-shadow: var(--otp-shadow);
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 32px 32px 24px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  scrollbar-width: thin;
}
.wc-otp-overlay:not([hidden]) .wc-otp-popup {
  transform: translateY(0) scale(1);
}

/* Close button */
.wc-otp-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--otp-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background var(--otp-transition), color var(--otp-transition);
}
.wc-otp-close:hover { background: #f3f4f6; color: var(--otp-text); }

/* Brand */
.wc-otp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.wc-otp-brand span {
  font-size: 17px;
  font-weight: 700;
  color: var(--otp-text);
  letter-spacing: -0.3px;
}

/* ---- Tabs ---- */
.wc-otp-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--otp-surface);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}
.wc-otp-tab {
  background: transparent;
  border: none;
  padding: 9px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--otp-muted);
  cursor: pointer;
  transition: all var(--otp-transition);
}
.wc-otp-tab.active {
  background: var(--otp-bg);
  color: var(--otp-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* Sub-tabs — Login (3 tabs) and Register (2 tabs) */
.wc-otp-subtabs {
  display: flex;
  gap: 0;
  background: var(--otp-surface);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}
.wc-otp-subtab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 9px 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--otp-muted);
  cursor: pointer;
  border-radius: 7px;
  transition: all var(--otp-transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1.2;
  text-align: center;
}
.wc-otp-subtab:hover { color: var(--otp-text); }
.wc-otp-subtab.active {
  background: var(--otp-bg);
  color: var(--otp-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

/* ---- Panels ---- */
.wc-otp-panel { display: none; }
.wc-otp-panel.active { display: block; }
.wc-otp-subpanel { display: none; }
.wc-otp-subpanel.active { display: block; }

/* ---- Steps ---- */
.wc-otp-step[hidden] { display: none !important; }

/* ---- Notice ---- */
.wc-otp-notice {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.45;
}
.wc-otp-notice[hidden] { display: none !important; }
.wc-otp-notice.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.wc-otp-notice.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.wc-otp-notice.info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ---- Fields ---- */
.wc-otp-field {
  margin-bottom: 16px;
}
.wc-otp-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--otp-text);
  margin-bottom: 6px;
}
.wc-otp-field input[type="text"],
.wc-otp-field input[type="email"],
.wc-otp-field input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--otp-border);
  border-radius: 9px;
  font-size: 14px;
  color: var(--otp-text);
  background: #fff;
  transition: border-color var(--otp-transition), box-shadow var(--otp-transition);
  box-sizing: border-box;
  outline: none;
}
.wc-otp-field input:focus {
  border-color: var(--otp-primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.wc-otp-field input.input-error {
  border-color: var(--otp-error);
}

/* Password wrap */
.wc-otp-pass-wrap { position: relative; }
.wc-otp-pass-wrap input { padding-right: 42px; }
.wc-otp-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--otp-muted);
  padding: 4px;
  display: flex;
  align-items: center;
}
.wc-otp-eye svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.wc-otp-eye:hover { color: var(--otp-primary); }

/* Forgot */
.wc-otp-forgot {
  text-align: right;
  margin-bottom: 16px;
  margin-top: -8px;
}
.wc-otp-forgot a {
  font-size: 12.5px;
  color: var(--otp-primary);
  text-decoration: none;
}
.wc-otp-forgot a:hover { text-decoration: underline; }

/* ---- OTP Boxes ---- */
.wc-otp-boxes {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 10px 0;
}
.wc-otp-box {
  width: 44px !important;
  height: 50px !important;
  border: 2px solid var(--otp-border) !important;
  border-radius: 10px !important;
  text-align: center !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--otp-primary) !important;
  padding: 0 !important;
  transition: all var(--otp-transition) !important;
  caret-color: var(--otp-primary);
}
.wc-otp-box:focus {
  border-color: var(--otp-primary) !important;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15) !important;
  outline: none !important;
}
.wc-otp-box.filled {
  border-color: var(--otp-primary) !important;
  background: #f5f3ff !important;
}

/* Resend */
.wc-otp-resend {
  text-align: center;
  font-size: 13px;
  color: var(--otp-muted);
  margin-top: 6px;
}
.wc-otp-resend-link { color: var(--otp-primary); font-weight: 600; text-decoration: none; }
.wc-otp-resend-link:hover { text-decoration: underline; }

/* ---- Buttons ---- */
.wc-otp-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--otp-primary), var(--otp-accent));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: all var(--otp-transition);
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}
.wc-otp-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(124,58,237,0.35); }
.wc-otp-btn:active { transform: translateY(0); }
.wc-otp-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.wc-otp-btn.loading::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wc-spin 0.7s linear infinite;
  top: 50%; left: 50%;
  margin: -9px 0 0 -9px;
}
.wc-otp-btn.loading { color: transparent; }

.wc-otp-btn-outline {
  background: transparent !important;
  border: 2px solid var(--otp-primary) !important;
  color: var(--otp-primary) !important;
  box-shadow: none !important;
}
.wc-otp-btn-outline:hover {
  background: var(--otp-surface) !important;
  transform: translateY(-1px);
}

/* ---- Password Strength ---- */
.wc-otp-strength {
  margin-top: 6px;
  height: 4px;
  background: var(--otp-border);
  border-radius: 2px;
  overflow: hidden;
}
.wc-otp-strength-bar {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}

/* ---- Step info ---- */
.wc-otp-step-info {
  font-size: 13.5px;
  color: var(--otp-muted);
  margin-bottom: 14px;
  text-align: center;
}
.wc-otp-step-info strong { color: var(--otp-text); }
.wc-otp-step-info a { color: var(--otp-primary); text-decoration: none; }

/* Verified badge */
.wc-otp-verified-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: #15803d;
  margin-bottom: 16px;
}
.wc-otp-verified-badge svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---- Terms ---- */
.wc-otp-terms {
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--otp-muted);
  text-align: center;
  line-height: 1.5;
}
.wc-otp-terms a { color: var(--otp-primary); text-decoration: none; }

/* ---- Trigger button ---- */
.wc-otp-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
  z-index: 9999;
  transition: all 0.2s ease;
}
.wc-otp-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124,58,237,0.5);
}

/* ---- Spinner ---- */
@keyframes wc-spin {
  to { transform: rotate(360deg); }
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
  .wc-otp-popup { padding: 24px 20px 20px; }
  .wc-otp-box { width: 38px !important; height: 44px !important; font-size: 18px !important; }
  .wc-otp-boxes { gap: 6px; }
}

/* ---- Forgot Password Panel ---- */
.wc-otp-back {
  margin-bottom: 16px;
}
.wc-otp-back a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #7c3aed;
  text-decoration: none;
  font-weight: 500;
}
.wc-otp-back a:hover { text-decoration: underline; }

.wc-otp-panel-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e1b4b;
  margin: 0 0 18px;
}

/* Channel tab CSS removed — now using unified .wc-otp-subtab system */
