/**
 * Form Validation Styles
 * Visual feedback for form validation states
 */

/* Input validation states */
.form-input--error {
  border-color: var(--color-error, #ef4444) !important;
  background-color: rgba(239, 68, 68, 0.05);
}

.form-input--error:focus {
  border-color: var(--color-error, #ef4444) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input--success {
  border-color: var(--color-success, #10b981) !important;
  background-color: rgba(16, 185, 129, 0.05);
}

.form-input--success:focus {
  border-color: var(--color-success, #10b981) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Error text */
.form-error-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-error, #ef4444);
  line-height: 1.4;
}

/* Character count */
.char-count {
  float: right;
  font-size: 0.75rem;
  color: var(--color-text-muted, #6b7280);
  font-weight: normal;
}

.char-count--warning {
  color: var(--color-warning, #f59e0b);
  font-weight: 600;
}

/* Form error alert */
.form-error.alert {
  margin-bottom: 1.5rem;
}

/* Disabled state */
.form-input:disabled,
.form-textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Button disabled state */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Success checkmark animation */
@keyframes checkmark {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.form-input--success::after {
  content: '✓';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-success, #10b981);
  font-size: 1.25rem;
  animation: checkmark 0.3s ease;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .form-error-text {
    font-size: 0.8125rem;
  }
  
  .char-count {
    font-size: 0.6875rem;
  }
}
