/* Admin theme overrides.
   Update these tokens to restyle the admin UI without touching public pages. */
body.admin-ui {
  --color-primary: #1D5D4D;
  --color-accent: #F5C2D6;
  --color-rural-cream: #FCFAF2;
  --color-traditional-orange: #F97316;

  --font-display: "Young Serif", "Cooper Black", serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;

  /* Admin-specific tighter spacing */
  --spacing-admin-card: 1.5rem;
  --spacing-admin-section: 2rem;
}

/* Variant row enter / exit animations */
@keyframes variant-row-enter {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes variant-row-exit {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-6px); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
body.admin-ui .variant-row-enter {
  /* transition: none prevents transition-all from racing against the animation */
  transition: none !important;
  animation: variant-row-enter 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.admin-ui .variant-row-exit {
  animation: variant-row-exit 0.18s cubic-bezier(0.55, 0, 1, 0.45) both;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  body.admin-ui .variant-row-enter,
  body.admin-ui .variant-row-exit {
    animation: none;
    transition: none !important;
  }
  body.admin-ui .stat-card {
    animation: none;
  }
}

/* Dashboard stat cards entrance */
body.admin-ui .stat-card {
  animation: fade-up 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.admin-ui .stat-card:nth-child(1) { animation-delay: 0.05s; }
body.admin-ui .stat-card:nth-child(2) { animation-delay: 0.1s; }

/* SortableJS drag states */
.sortable-ghost {
  opacity: 0.35;
  background: oklch(0.94 0.02 160);
  border-style: dashed;
}
.sortable-chosen {
  cursor: grabbing !important;
  box-shadow: 0 8px 24px -4px oklch(0.35 0.08 160 / 0.2);
}
.sortable-chosen [data-drag-handle] {
  cursor: grabbing !important;
}

/* Hide number input spinners across all browsers */
body.admin-ui input[type="number"]::-webkit-inner-spin-button,
body.admin-ui input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
body.admin-ui input[type="number"] {
  -moz-appearance: textfield;
}
