html, body { min-height: 100%; }

#preview-img.ready { cursor: zoom-in; }
#preview-img { user-select: none; -webkit-user-drag: none; }

/* Zoom modal: we handle all gestures via pointer events, so disable native ones */
#zoom-modal { touch-action: none; user-select: none; -webkit-user-select: none; }
#zoom-scroll { cursor: grab; overscroll-behavior: contain; }
#zoom-scroll.panning { cursor: grabbing; }
#zoom-img { will-change: transform; -webkit-user-drag: none; }

::selection { background: rgba(59, 130, 246, 0.35); color: #fff; }

#date-list::-webkit-scrollbar { width: 8px; }
#date-list::-webkit-scrollbar-track { background: transparent; }
#date-list::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
#date-list::-webkit-scrollbar-thumb:hover { background: #475569; }

.date-row .new-input.changed {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  color: #e0ecff;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.date-row { animation: fade-in .15s ease-out; }

#toast.info    { background: #1e293b; }
#toast.success { background: #059669; }
#toast.error   { background: #dc2626; }

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px) scale(0.97); }
  to   { opacity: 1; transform: translate(-50%, 0)   scale(1); }
}
#toast:not(.hidden) { animation: toast-in .18s ease-out; }

/* Spinners */
.spinner {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -2px;
  margin-right: 6px;
}
.spinner.lg { width: 20px; height: 20px; border-width: 2.5px; margin-right: 10px; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton rows while scanning */
.skeleton-row {
  height: 34px;
  border-radius: 6px;
  background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%);
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  opacity: 0.6;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Dropzone busy overlay */
.dropzone-busy {
  pointer-events: none;
  opacity: 0.75;
}

/* Flatpickr tweaks to sit on top of modal dialogs / preview cleanly */
.flatpickr-input { caret-color: transparent; }
