/* Smooth Forms CSS - Enhanced User Experience */

/* Smooth transitions for form elements */
form {
  transition: all 0.3s ease;
}

input, select, textarea, button {
  transition: all 0.2s ease;
}

/* Focus effects */
input:focus, select:focus, textarea:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Button hover effects */
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Loading state for buttons */
button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Smooth alert animations */
.smooth-alert {
  animation: slideInRight 0.3s ease-out;
}

.smooth-alert.success {
  background: linear-gradient(135deg, #4CAF50, #45a049);
}

.smooth-alert.error {
  background: linear-gradient(135deg, #f44336, #da190b);
}

.smooth-alert.info {
  background: linear-gradient(135deg, #2196F3, #0b7dda);
}

/* Form validation feedback */
input:invalid {
  border-color: #f44336;
  animation: shake 0.5s ease-in-out;
}

input:valid {
  border-color: #4CAF50;
}

/* Shake animation for invalid inputs */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Slide in animation for alerts */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Page transition effects */
.page-transition {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.page-transition.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Form submission loading state */
.form-loading {
  position: relative;
  pointer-events: none;
}

.form-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.form-loading::before {
  content: 'Loading...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 11;
  font-weight: bold;
  color: #333;
}

/* Smooth checkbox and radio button effects */
input[type="checkbox"], input[type="radio"] {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

input[type="checkbox"]:checked, input[type="radio"]:checked {
  transform: scale(1.2);
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
  .smooth-alert {
    right: 10px;
    left: 10px;
    transform: none;
    width: auto;
  }
  
  input:focus, select:focus, textarea:focus {
    transform: none;
  }
  
  button:hover {
    transform: none;
  }
} 