/* ═══════════════════════════════════════════
   OTP SMS Doğrulama Popup
   Tüm landing page formlarında ortak kullanılır
   ═══════════════════════════════════════════ */

/* Popup Overlay */
.otp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.otp-overlay.active {
  display: flex;
}

/* Popup Kutusu */
.otp-popup {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  position: relative;
  animation: otpPopIn .3s ease;
  text-align: center;
}

@keyframes otpPopIn {
  from { opacity: 0; transform: scale(.92) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Kapat butonu */
.otp-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color .2s;
}

.otp-close:hover {
  color: #374151;
}

/* Başlık alanı */
.otp-icon {
  width: 56px;
  height: 56px;
  background: #fef2f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.otp-icon svg {
  width: 28px;
  height: 28px;
  color: #c8102e;
}

.otp-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 6px;
}

.otp-subtitle {
  font-size: .85rem;
  color: #6b7280;
  margin: 0 0 4px;
  line-height: 1.4;
}

.otp-phone-display {
  font-size: .9rem;
  font-weight: 600;
  color: #111;
  margin: 0 0 20px;
}

/* 6 haneli kod kutuları */
.otp-code-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.otp-code-inputs input {
  width: 44px;
  height: 50px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  border: 2px solid #d1d5db;
  border-radius: 10px;
  background: #f9fafb;
  color: #111;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  padding: 0;
  -moz-appearance: textfield;
}

.otp-code-inputs input::-webkit-inner-spin-button,
.otp-code-inputs input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.otp-code-inputs input:focus {
  border-color: #c8102e;
  box-shadow: 0 0 0 3px rgba(200, 16, 46, .12);
  background: #fff;
}

.otp-code-inputs input.otp-filled {
  border-color: #16a34a;
  background: #f0fdf4;
}

.otp-code-inputs input.otp-error {
  border-color: #dc2626;
  background: #fef2f2;
  animation: otpShake .4s ease;
}

@keyframes otpShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* Timer */
.otp-timer {
  font-size: .8rem;
  color: #6b7280;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.otp-timer.expired {
  color: #c8102e;
}

/* Mesaj */
.otp-message {
  font-size: .8rem;
  color: #6b7280;
  margin-bottom: 12px;
  min-height: 20px;
}

.otp-message.success {
  color: #16a34a;
  font-weight: 500;
}

.otp-message.error {
  color: #dc2626;
}

/* Tekrar gönder */
.otp-resend-btn {
  background: none;
  border: none;
  color: #c8102e;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.otp-resend-btn:disabled {
  color: #9ca3af;
  cursor: not-allowed;
  text-decoration: none;
}

/* Doğrulama başarılı animasyonu */
.otp-success-icon {
  display: none;
  width: 64px;
  height: 64px;
  background: #16a34a;
  border-radius: 50%;
  margin: 0 auto 16px;
  align-items: center;
  justify-content: center;
  animation: otpSuccessPop .4s ease;
}

.otp-success-icon.active {
  display: flex;
}

.otp-success-icon svg {
  width: 32px;
  height: 32px;
  color: #fff;
}

@keyframes otpSuccessPop {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.otp-success-text {
  display: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: #16a34a;
  margin-bottom: 8px;
}

.otp-success-text.active {
  display: block;
}

/* Loading spinner */
.otp-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #6b7280;
  font-size: .85rem;
}

.otp-loading.active {
  display: flex;
}

.otp-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #e5e7eb;
  border-top-color: #c8102e;
  border-radius: 50%;
  animation: otpSpin .6s linear infinite;
}

@keyframes otpSpin {
  to { transform: rotate(360deg); }
}

/* Mobil uyumluluk */
@media (max-width: 480px) {
  .otp-popup {
    padding: 24px 20px;
    border-radius: 14px;
  }

  .otp-code-inputs {
    gap: 6px;
  }

  .otp-code-inputs input {
    width: 38px;
    height: 44px;
    font-size: 1.1rem;
    border-radius: 8px;
  }
}
