/* 2fa-verification.css */
.modal-content {
  position: relative;
  background: #fff;
  padding: 1rem;
  border-radius: 0.5rem;
  max-width: 100%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.header-gradient {
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  border-radius: 8px 8px 0 0;
}

.dark .header-gradient {
  background: linear-gradient(135deg, #1e40af, #111827);
}

.otp-input {
  width: 40px;
  height: 48px;
  text-align: center;
  font-size: 1.25rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dark .otp-input {
  border-color: #4b5563;
  background: #374151;
  color: #fff;
}

.otp-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.otp-input.error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  padding: 12px 32px;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-primary .button-text {
  display: inline;
}

.btn-primary.loading .button-text {
  display: inline;
}

.btn-primary.loading .loading-spinner {
  display: inline-flex;
}

.message-container {
  min-height: 0;
  opacity: 0;
  transition: opacity 0.3s ease, min-height 0.3s ease;
}

.message-container.visible {
  min-height: 24px;
  opacity: 1;
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin: 0;
  padding: 0.25rem 0;
  display: block;
  font-weight: 400;
}

@keyframes slide-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.animate-slide-in {
  animation: slide-in 0.3s ease;
}

.animate-pulse-once {
  animation: pulse 1.5s ease-in-out 2;
}

@media (max-width: 640px) {
  .modal-content {
    padding: 0.5rem; /* Reduced from 0.75rem to maximize space */
    margin: 1rem auto;
    max-width: 90%;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
  }
  
  .otp-input {
    width: 12px; /* Smaller than 28px */
    height: 18px; /* Smaller than 34px */
    font-size: 0.875rem;
    border-radius: 6px;
  }

  .flex.gap-2 {
    gap: 0.1rem; /* Smaller than 0.5rem (~6px) */
    flex-wrap: nowrap; /* Keep all six inline */
    justify-content: center;
  }

  .btn-primary {
    padding: 10px 24px;
    font-size: 0.875rem;
    border-radius: 6px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
  }

  .message-container.visible {
    min-height: 20px;
  }

  .error-message {
    font-size: 0.75rem;
  }
}

@media (prefers-contrast: high) {
  .otp-input {
    border: 2px solid #000;
  }

  .otp-input:focus {
    border-color: #000;
    box-shadow: 0 0 0 3px #000;
  }

  .btn-primary {
    border: 2px solid #000;
    background: #000080;
  }
}