/**
 * OTP Verification Styles
 * Styles for mobile OTP verification flow
 */

/* OTP Section Container */
.otp-verification-section {
  padding: 30px 0;
  text-align: center;
}

.otp-header h3 {
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.otp-description {
  color: #6b7280;
  font-size: 14px;
  margin: 0 0 30px 0;
}

/* Mobile Input */
.mobile-input-wrapper {
  max-width: 400px;
  margin: 0 auto;
}

.mobile-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.country-code {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 12px 16px;
  font-weight: 600;
  color: #374151;
  font-size: 15px;
}

.mobile-input-group .form-control {
  flex: 1;
}

.field-hint {
  display: block;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 20px;
}

/* OTP Boxes */
.otp-input-wrapper {
  max-width: 400px;
  margin: 0 auto;
}

.otp-sent-message {
  color: #059669;
  font-size: 14px;
  margin: 0 0 10px 0;
  font-weight: 500;
}

.verified-email {
  color: #1e40af;
  font-weight: 600;
}

.email-change-link {
  margin: 0 0 20px 0;
  text-align: center;
}

.change-email-link {
  color: #6b7280;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}

.change-email-link:hover {
  color: var(--superio-theme-color, #1e40af);
  text-decoration: underline;
}

.change-email-link i {
  font-size: 12px;
}

.otp-boxes {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.otp-box {
  width: 50px;
  height: 55px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  transition: all 0.2s;
  background: #fff;
}

.otp-box:focus {
  outline: none;
  border-color: var(--superio-theme-color, #1e40af);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.otp-box.error {
  border-color: #dc2626;
  animation: shake 0.3s;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* OTP Actions */
.otp-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.btn-resend-otp {
  background: none;
  border: none;
  color: var(--superio-theme-color, #1e40af);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  padding: 8px 16px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-resend-otp:hover:not(:disabled) {
  color: #1e3a8a;
  text-decoration: underline;
}

.btn-resend-otp:disabled {
  color: #9ca3af;
  cursor: not-allowed;
}

.btn-resend-otp i {
  font-size: 14px;
}

.countdown {
  font-weight: 600;
}

/* OTP Messages */
.otp-message {
  padding: 12px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.otp-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #dc2626;
}

.otp-message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.otp-message i {
  font-size: 18px;
}

/* OTP Success State */
.otp-success {
  text-align: center;
  padding: 40px 20px;
}

.otp-success i {
  font-size: 64px;
  color: #10b981;
  margin-bottom: 20px;
  display: block;
}

.otp-success h3 {
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 10px 0;
}

.otp-success p {
  color: #6b7280;
  font-size: 14px;
  margin: 0;
}

/* Button Styles */
.btn-send-otp,
.btn-verify-otp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-block {
  width: 100%;
}

.btn-send-otp i,
.btn-verify-otp i {
  font-size: 16px;
}

/* Loading State */
.btn-send-otp.loading,
.btn-verify-otp.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn-send-otp.loading::after,
.btn-verify-otp.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile Input Error State */
#candidate_mobile.error {
  border-color: #dc2626;
}

#candidate_mobile.error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Verified Mobile Field */
input.verified {
  background: #f0fdf4;
  border-color: #10b981;
}

input.verified:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .otp-verification-section {
    padding: 20px 0;
  }

  .otp-header h3 {
    font-size: 20px;
  }

  .otp-boxes {
    gap: 8px;
  }

  .otp-box {
    width: 45px;
    height: 50px;
    font-size: 20px;
  }

  .mobile-input-wrapper,
  .otp-input-wrapper {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .otp-boxes {
    gap: 6px;
  }

  .otp-box {
    width: 40px;
    height: 45px;
    font-size: 18px;
  }
}
