/**
 * Batteries.com — Email OTP Verification Styles
 * Uses the existing site CSS variables. Add this <style> block or link it.
 */

/* Email input + Verify button row */
.otp-email-row {
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
}
.otp-email-row input[name="email"] {
  flex: 1;
}
.otp-send-btn {
  padding: 12px 20px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.otp-send-btn:hover {
  background: var(--accent);
  color: #fff;
}
.otp-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* OTP verification box */
.otp-wrapper {
  animation: otpSlideIn 0.3s ease;
}
@keyframes otpSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.otp-box {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.otp-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.otp-message strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Code input + verify button row */
.otp-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.otp-code-input {
  flex: 1;
  background: var(--bg-primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 10px 14px !important;
  color: var(--text-primary) !important;
  font-size: 18px !important;
  font-family: 'Space Mono', monospace !important;
  letter-spacing: 6px;
  text-align: center;
  width: auto !important;
}
.otp-code-input:focus {
  border-color: var(--accent) !important;
  outline: none;
}
.otp-code-input::placeholder {
  font-size: 14px !important;
  letter-spacing: 0;
  font-family: 'DM Sans', sans-serif !important;
  color: var(--text-muted) !important;
}
.otp-verify-btn {
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.otp-verify-btn:hover {
  background: var(--accent-hover);
}
.otp-verify-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Resend + change email links */
.otp-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}
.otp-resend-btn,
.otp-change-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}
.otp-resend-btn:hover:not(:disabled),
.otp-change-btn:hover {
  color: var(--accent);
}
.otp-resend-btn:disabled {
  cursor: default;
}

/* Error message */
.otp-error {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  color: var(--red);
  font-size: 13px;
}

/* Verified badge */
.otp-verified-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-sm);
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
  animation: otpSlideIn 0.3s ease;
}

/* Mobile: stack the email row */
@media (max-width: 768px) {
  .otp-email-row {
    flex-direction: column;
  }
  .otp-input-row {
    flex-direction: column;
  }
}
