/* Devise Authentication Pages Styling */

/* Smooth transitions for form elements */
.devise-form input[type="email"],
.devise-form input[type="password"] {
  transition: all 0.2s ease-in-out;
}

/* Focus states with better visual feedback */
.devise-form input[type="email"]:focus,
.devise-form input[type="password"]:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Button hover effects */
.devise-submit-btn {
  transition: all 0.2s ease-in-out;
}

.devise-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* Loading animation for submit button */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Error state styling */
.field-with-errors input {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Success feedback */
.form-success {
  background-color: #f0fdf4;
  border-color: #22c55e;
  color: #15803d;
}

/* Responsive improvements */
@media (max-width: 640px) {
  .devise-container {
    padding: 1rem;
  }
  
  .devise-form {
    padding: 1.5rem;
  }
}

/* Accessibility improvements */
.devise-form input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

/* Link hover effects */
.devise-link {
  position: relative;
  transition: color 0.2s ease-in-out;
}

.devise-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: currentColor;
  transition: width 0.2s ease-in-out;
}

.devise-link:hover::after {
  width: 100%;
}

/* Form validation feedback */
.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #ef4444;
}

.valid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #22c55e;
}

/* Password strength indicator */
.password-strength {
  height: 4px;
  background-color: #e5e7eb;
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  transition: width 0.3s ease-in-out;
  border-radius: 2px;
}

.strength-weak {
  background-color: #ef4444;
  width: 25%;
}

.strength-fair {
  background-color: #f59e0b;
  width: 50%;
}

.strength-good {
  background-color: #3b82f6;
  width: 75%;
}

.strength-strong {
  background-color: #22c55e;
  width: 100%;
}
