@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

.error-msg {
  pointer-events: none;
}

/* Premium field focus glow */
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.1);
  border-color: rgba(255, 193, 7, 0.5) !important;
}

input.border-red-500:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.5) !important;
}

/* Fix for managed file upload layout in our premium design */
.drupal-file-upload .form-managed-file {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.drupal-file-upload .form-managed-file input[type="file"] {
  display: block;
  width: 100%;
  padding: 2rem;
  border: 2px dashed #e2e8f0;
  border-radius: 1rem;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
}

.drupal-file-upload .form-managed-file input[type="file"]:hover {
  border-color: #ffc107;
  background: #fff;
}

/* Premium Uploaded File State */
.drupal-file-upload .file {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  color: #05080c;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.drupal-file-upload .file::before {
  content: "📄";
  font-size: 1.5rem;
}

.drupal-file-upload .form-managed-file input[type="submit"][value="Remove"] {
  background: #ef4444;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.2s;
}

.drupal-file-upload .form-managed-file input[type="submit"][value="Remove"]:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

/* Simulated Progress bar */
.premium-progress-wrapper {
  margin-top: 1rem;
  background: #f1f5f9;
  border-radius: 8px;
  height: 6px;
  overflow: hidden;
  display: none;
}
.premium-progress-bar {
  background: linear-gradient(90deg, #ffc107, #f59e0b);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}
label.error {
  display: none !important;
}

/* Premium Error Messages */
.error-msg {
  display: flex !important;
  align-items: center;
  gap: 6px;
  color: #ef4444 !important;
  font-size: 11px;
  font-weight: 700;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.05);
  border-radius: 8px;
  border-left: 3px solid #ef4444;
  pointer-events: none;
  animation: slideInLeft 0.3s ease-out forwards;
}

.error-msg::before {
  content: "!";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Red required markers */
.form-required:after,
.label-required:after {
  content: " *";
  color: #ef4444 !important;
  font-weight: 900;
}

/* Drupal error states */
input.error, 
select.error,
.form-item--error input,
.form-item--error select {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.border-red-500 {
  border: 1px solid #ef4444 !important;
  animation: pulse-red 2s infinite !important;
  background: rgba(239, 68, 68, 0.02) !important;
}
