/* Security Enhancement Styles */
/* Add these styles to your style.css file */

/* Validation feedback styles */
.field-feedback {
  font-size: 12px;
  margin-top: 5px;
  display: block;
}

.field-feedback.valid {
  color: #28a745;
}

.field-feedback.invalid {
  color: #dc3545;
}

input.valid {
  border-color: #28a745 !important;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

input.invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Session warning styles */
#session-warning {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ff6b6b, #ff8787);
  color: white;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3);
  z-index: 10000;
  max-width: 350px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

#session-warning button {
  background: white;
  color: #ff6b6b;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

#session-warning button:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

/* Enhanced form security indicators */
.form-secure {
  position: relative;
}

.form-secure::after {
  content: '🔒';
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 12px;
  opacity: 0.5;
}

/* CSRF token indicator (hidden by default) */
.csrf-indicator {
  display: none;
}

/* Enhanced input focus states with security */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #007bff !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
  transition: all 0.2s ease;
}

/* Security badge for forms */
.security-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

.security-badge i {
  margin-right: 4px;
}

/* Loading overlay for security operations */
.security-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

.security-overlay-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.security-overlay-content i {
  font-size: 48px;
  color: #007bff;
  margin-bottom: 15px;
}

/* Enhanced error messages */
.security-error {
  background: linear-gradient(135deg, #dc3545, #e74c3c);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 4px solid #c82333;
  margin: 10px 0;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Success messages */
.security-success {
  background: linear-gradient(135deg, #28a745, #34ce57);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 4px solid #1e7e34;
  margin: 10px 0;
}

/* Password strength indicator enhancements */
.password-strength-bar {
  height: 4px;
  border-radius: 2px;
  margin-top: 5px;
  transition: all 0.3s ease;
}

.password-strength-weak { background: #dc3545; width: 25%; }
.password-strength-fair { background: #ffc107; width: 50%; }
.password-strength-good { background: #28a745; width: 75%; }
.password-strength-strong { background: #007bff; width: 100%; }

/* Responsive security elements */
@media (max-width: 768px) {
  #session-warning {
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .security-overlay-content {
    margin: 20px;
    padding: 20px;
  }
}
