/* Lead form email OTP — modal verification (contact, pricing, partners) */

body.ct-otp-modal-open {
  overflow: hidden;
}

.ct-otp-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ct-otp-modal.hidden {
  display: none;
}

.ct-otp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.ct-otp-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  text-align: center;
}

.ct-otp-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.ct-otp-modal-close:hover {
  color: #0f172a;
}

.ct-otp-modal-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
}

.ct-otp-modal-message {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--primary, #1a56db);
}

.ct-otp-modal-email {
  margin: 0.5rem 0 0;
}

.ct-otp-modal-sending {
  margin: 1rem 0 0;
}

.ct-otp-modal-body--disabled {
  opacity: 0.45;
  pointer-events: none;
}

.ct-otp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
}

.ct-otp-modal-footer {
  width: 100%;
}

.ct-otp-digits {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.ct-otp-digit {
  flex-shrink: 0;
  height: 2.75rem;
  width: 2.5rem;
  border-radius: 0.375rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  text-align: center;
  font-size: 1.125rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.ct-otp-digit:focus {
  outline: none;
  border-color: var(--primary, #1a56db);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary, #1a56db) 25%, transparent);
}

.ct-otp-verify-btn,
.ct-otp-cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 2rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ct-otp-verify-btn {
  border: none;
  background: var(--primary, #1a56db);
  color: var(--primary-foreground, #fff);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.ct-otp-verify-btn:hover:not(:disabled) {
  background: color-mix(in oklch, var(--primary, #1a56db) 90%, black);
}

.ct-otp-verify-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--ring, #1a56db);
}

.ct-otp-verify-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

.ct-otp-cancel-btn {
  border: 1px solid var(--border, #e2e8f0);
  background: var(--background, #fff);
  color: var(--foreground, #0f172a);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.ct-otp-cancel-btn:hover {
  background: var(--accent, #f1f5f9);
  color: var(--accent-foreground, #0f172a);
}

.ct-otp-cancel-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--ring, #1a56db);
}

.ct-otp-resend-btn {
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--primary, #1a56db);
  font-weight: 500;
  text-decoration: none;
  padding: 0;
  margin-left: 0.25rem;
}

.ct-otp-resend-btn:hover:not(:disabled) {
  color: color-mix(in oklch, var(--primary, #1a56db) 85%, black);
}

.ct-otp-resend-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

@media (max-width: 420px) {
  .ct-otp-digit {
    height: 2.5rem;
    width: 2.25rem;
    font-size: 1rem;
  }

  .ct-otp-digits {
    gap: 0.375rem;
  }
}
