/* ============================================================
   AUTH.CSS — OTP Login Modal Styles
   Qyukit Kerala Jobs · Glassmorphism design
============================================================ */

/* ── Overlay backdrop ─────────────────────────────────── */
.otp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 30, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: qOverlayIn 0.25s ease;
}
@keyframes qOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Modal card ───────────────────────────────────────── */
.otp-modal {
  background: linear-gradient(145deg, #ffffff 0%, #f8faff 100%);
  border-radius: 24px;
  padding: 36px 32px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow:
    0 32px 80px rgba(79, 70, 229, 0.22),
    0 2px 0 rgba(255,255,255,0.9) inset;
  animation: qModalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}
@keyframes qModalIn {
  from { opacity: 0; transform: translateY(32px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Accent gradient bar at top */
.otp-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed, #ec4899);
  border-radius: 24px 24px 0 0;
}

/* ── Close button ─────────────────────────────────────── */
.otp-close {
  position: absolute;
  top: 14px; right: 16px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  cursor: pointer;
  font-size: 16px;
  color: #64748b;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.otp-close:hover { background: #e2e8f0; color: #1e293b; }

/* ── Header ───────────────────────────────────────────── */
.otp-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.otp-logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}
.otp-logo-text { font-size: 18px; font-weight: 800; color: #1e293b; }
.otp-logo-sub  { font-size: 12px; color: #64748b; font-weight: 500; margin-top: 1px; }

.otp-title {
  font-size: 22px;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}
.otp-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 24px;
  line-height: 1.5;
}
.otp-subtitle strong { color: #4f46e5; }

/* ── Step indicators ──────────────────────────────────── */
.otp-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.otp-step-dot {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: #e2e8f0;
  transition: background 0.35s;
}
.otp-step-dot.active { background: linear-gradient(90deg, #4f46e5, #7c3aed); }

/* ── Input field ──────────────────────────────────────── */
.otp-field-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  display: block;
}
.otp-phone-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.otp-flag {
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.otp-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.otp-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.otp-input::placeholder { color: #cbd5e1; font-weight: 400; }

/* 6-digit OTP boxes */
.otp-digits-wrap {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}
.otp-digit {
  width: 46px;
  height: 52px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: #1e293b;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.otp-digit:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

/* ── Buttons ──────────────────────────────────────────── */
.otp-btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s;
  box-shadow: 0 4px 16px rgba(79,70,229,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.otp-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(79,70,229,0.4);
}
.otp-btn-primary:active { transform: scale(0.98); }
.otp-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.otp-btn-ghost {
  background: none;
  border: none;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  transition: color 0.2s;
}
.otp-btn-ghost:hover { color: #7c3aed; }
.otp-btn-ghost:disabled { color: #94a3b8; cursor: not-allowed; }

/* ── Timer & resend ───────────────────────────────────── */
.otp-timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 13px;
  color: #64748b;
}
.otp-timer-num { color: #4f46e5; font-weight: 700; }

/* ── Error / info messages ────────────────────────────── */
.otp-msg {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  display: none;
}
.otp-msg.show      { display: block; }
.otp-msg.error     { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.otp-msg.success   { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.otp-msg.info      { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* ── Edit phone link ──────────────────────────────────── */
.otp-sent-to {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
}
.otp-sent-to strong { color: #1e293b; }

/* ── Spinner ──────────────────────────────────────────── */
.otp-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: qSpin 0.7s linear infinite;
  display: inline-block;
}
@keyframes qSpin {
  to { transform: rotate(360deg); }
}

/* ── Success state ────────────────────────────────────── */
.otp-success-wrap {
  text-align: center;
  padding: 16px 0 8px;
}
.otp-success-icon {
  font-size: 56px;
  display: block;
  margin-bottom: 12px;
  animation: qBounce 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes qBounce {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.otp-success-title {
  font-size: 20px;
  font-weight: 800;
  color: #16a34a;
  margin-bottom: 6px;
}
.otp-success-name {
  font-size: 15px;
  color: #374151;
  font-weight: 500;
}

/* ── reCAPTCHA container (invisible) ─────────────────── */
#qyukit-recaptcha { margin-top: 12px; }

/* ── Divider ──────────────────────────────────────────── */
.otp-divider {
  text-align: center;
  color: #cbd5e1;
  font-size: 12px;
  margin: 14px 0;
  position: relative;
}
.otp-divider::before, .otp-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: #e2e8f0;
}
.otp-divider::before { left: 0; }
.otp-divider::after  { right: 0; }

/* ── Nav button update ────────────────────────────────── */
.qauth-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: box-shadow 0.2s;
}
.qauth-user-pill:hover {
  box-shadow: 0 4px 16px rgba(79,70,229,0.4);
}
.qauth-avatar {
  width: 26px; height: 26px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 480px) {
  .otp-modal { padding: 28px 20px 24px; }
  .otp-digit { width: 40px; height: 48px; font-size: 20px; }
  .otp-title { font-size: 19px; }
}
