/* Smooth Fade-in */
.animate-fade-in { animation:fadeIn .9s ease-in-out; }
@keyframes fadeIn { from{opacity:0;transform:translateY(20px);} to{opacity:1;transform:translateY(0);} }

/* Shake Animation */
@keyframes shake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-6px);} 50%{transform:translateX(6px);} 75%{transform:translateX(-6px);} }
.shake { animation:shake .4s ease-in-out; }

/* File Preview */
/* --- Optimized File Preview --- */
#file-preview { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 12px; 
  margin-top: 15px; 
  max-height: 200px; 
  overflow-y: auto; 
  padding: 4px; /* Prevents box-shadow clipping */
}

.preview-item { 
  position: relative; 
  width: 80px; 
  height: 80px; 
  border-radius: 12px; /* Matches form rounded-xl */
  overflow: hidden; 
  background: #f3f4f6; 
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-item img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}

.remove-btn { 
  position: absolute; 
  top: 4px; 
  right: 4px; 
  background: #ef4444; 
  color: #fff; 
  width: 20px;   /* Fixed width */
  height: 20px;  /* Fixed height */
  border-radius: 50%; 
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer; 
  border: 1px solid white;
  z-index: 10;
  transition: transform 0.2s ease;
}

.remove-btn:hover {
  transform: scale(1.1);
  background: #dc2626;
}

/* --- Smooth Progress Bar --- */
#upload-progress {
  transition: width 0.3s ease-in-out; /* Makes the bar slide smoothly */
}

/* --- Dropzone Hover State --- */
#drop-zone.dragover {
  border-color: #2563eb;
  background-color: #eff6ff;
}

/* Hide native file input */
input[type="file"] { display:none; }

/* Form Field Borders */
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  border: 2px solid #d1d5db; /* Tailwind gray-300 */
  border-radius: 0.75rem;    /* rounded-xl */
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: #2563eb;     /* Tailwind blue-600 */
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

textarea {
  min-height: 120px;
  resize: vertical;
}





[x-cloak] { display: none !important; }
.scrollbar-thin::-webkit-scrollbar { width: 6px; }
.scrollbar-thin::-webkit-scrollbar-thumb {
  background-color: rgba(100,116,139,0.3);
  border-radius: 9999px;
}
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100,116,139,0.5);
}