.flash {
  transform: translateY(150%);
  animation: slideUp 1s ease-out forwards, slideDown 1s ease-in forwards;
  animation-delay: 0s, 7.1s;
}

@keyframes slideUp {
  to {
    transform: translateY(0);
  }
}

@keyframes slideDown {
  to {
    transform: translateY(150%);
  }
}

body {
  font-family: "Outfit", sans-serif;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html {
  scroll-behavior: smooth;
}


input:focus,
textarea:focus,
select:focus,
button:focus {
  outline: none;

}

.bookfont {
  font-family: "Literata", serif;
}

.funfont {
  font-family: "Caveat", sans-serif;
}

.codefont {
  font-family: "JetBrains Mono", sans-serif;
}

.cursivefont {
  font-family: "Petit Formal Script", sans-serif;
}


.dragarea {
  position: relative;
}

.dragable {
  touch-action: none; /* let the engine own all pointer gestures, no native scroll/zoom fighting it */
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
}

.dragable.dragging {
  cursor: grabbing;
  opacity: 0.95;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22), 0 2px 6px rgba(15, 23, 42, 0.12);
}

.dragable.drag-disabled,
.dragable[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
}

.drag-placeholder {
  box-sizing: border-box;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.08);
  border: 2px dashed rgba(99, 102, 241, 0.45);
}

body.dragengine-active {
  cursor: grabbing;
  -webkit-user-select: none;
  user-select: none;
}


dropdown {
  display: none;
  position: fixed;
  z-index: 9999 !important;
  min-width: 12rem;
  max-width: calc(100vw - 2rem);
  background: #f4f4f5;
  border: 1px solid #d4d4d8;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  padding: 0.25rem 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px) scale(0.95);
  transition: opacity 150ms ease-out, transform 150ms ease-out;
  pointer-events: none;
}

dropdown.dropdown-open {
  display: block !important;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

dropdown a,
dropdown button {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #18181b;
  text-decoration: none;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 100ms;
  white-space: nowrap;
}

dropdown a:hover,
dropdown button:hover {
  background-color: #E8E5E0;
}

dropdown hr {
  border: none;
  border-top: 1px solid #e4e4e7;
  margin: 0.25rem 0;
}

dropdown > div {
  padding: 0.5rem 1rem;
}

dropdown .text-muted,
dropdown small {
  color: #71717a;
  font-size: 0.75rem;
  line-height: 1rem;
  padding: 0.25rem 1rem;
  display: block;
}


pre code.hljs {
  background: transparent !important;
  padding: 0 !important;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.animate-in { animation: fadeSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* Premium Accurate state */
.sku-accurate-btn.accurate {
  background-color: #f0fdf4 !important;
  border-color: #22c55e !important;
  color: #16a34a !important;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.15) !important;
}
.dark .sku-accurate-btn.accurate {
  background-color: rgba(34, 197, 94, 0.1) !important;
  border-color: rgba(34, 197, 94, 0.2) !important;
  color: #4ade80 !important;
}
.sku-accurate-btn.accurate .accurate-icon-circle {
  border-color: #22c55e !important;
  background-color: #22c55e !important;
}
.dark .sku-accurate-btn.accurate .accurate-icon-circle {
  border-color: #4ade80 !important;
  background-color: #4ade80 !important;
}
.sku-accurate-btn.accurate .accurate-icon-check {
  color: white !important;
}
.dark .sku-accurate-btn.accurate .accurate-icon-check {
  color: #064e3b !important;
}

/* Premium Issue active state */
.sku-issue-btn.issue-active {
  background-color: #fff1f2 !important;
  border-color: #f43f5e !important;
  color: #e11d48 !important;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.15) !important;
}
.dark .sku-issue-btn.issue-active {
  background-color: rgba(244, 63, 94, 0.1) !important;
  border-color: rgba(244, 63, 94, 0.2) !important;
  color: #fb7185 !important;
}

/* Issue reported state for Accurate button */
.sku-accurate-btn.issue-reported {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
  pointer-events: none;
  opacity: 0.7;
}
.dark .sku-accurate-btn.issue-reported {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #64748b !important;
}
.sku-accurate-btn.issue-reported .accurate-icon-circle {
  border-color: #cbd5e1 !important;
  background-color: transparent !important;
}
.dark .sku-accurate-btn.issue-reported .accurate-icon-circle {
  border-color: #475569 !important;
}
.sku-accurate-btn.issue-reported .accurate-icon-check {
  color: transparent !important;
}

/* Deviation state for Accurate button */
.sku-accurate-btn.deviation-reported {
  background-color: #fff7ed !important;
  border-color: #fed7aa !important;
  color: #ea580c !important;
  pointer-events: none;
}
.dark .sku-accurate-btn.deviation-reported {
  background-color: rgba(255, 237, 213, 0.05) !important;
  border-color: rgba(255, 237, 213, 0.1) !important;
  color: #fb923c !important;
}
.sku-accurate-btn.deviation-reported .accurate-icon-circle {
  border-color: #fb923c !important;
  background-color: transparent !important;
}
.dark .sku-accurate-btn.deviation-reported .accurate-icon-circle {
  border-color: #ea580c !important;
}
.sku-accurate-btn.deviation-reported .accurate-icon-check {
  color: transparent !important;
}

/* Smooth, premium pulse ring */
.sku-card-inner.pulse-highlight {
  animation: premiumPulse 1.8s cubic-bezier(0.4, 0, 0.2, 1) 2;
}
@keyframes premiumPulse {
  0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.6), 0 2px 12px rgba(0,0,0,0.03); border-color: rgba(244, 63, 94, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(244, 63, 94, 0), 0 2px 12px rgba(0,0,0,0.03); border-color: rgba(244, 63, 94, 0.2); }
  100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0), 0 2px 12px rgba(0,0,0,0.03); border-color: transparent; }
}

/* Toast slick animation */
#toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* ---------------------------------------------------------------------------
   Admin panel dark-mode helpers.
   Admin templates use a slightly different token set (brand / line / raised /
   ink-muted) and rely on these overrides instead of dark: variants. Tailwind's
   own dark:* rules are emitted later in <head>, so they still win for any
   element that already carries an explicit dark: class.
--------------------------------------------------------------------------- */
.dark .text-ink { color: #E9EAF0; }
.dark .text-ink-muted { color: #9598AD; }
.dark .text-brand { color: #FF6B5A; }
.dark .text-danger { color: #C97972; }
.dark .text-success { color: #6F9B7A; }
.dark .border-line { border-color: #404358; }
.dark .bg-surface { background-color: #2F3140; }
.dark .bg-raised { background-color: #2A2C38; }
.dark .bg-line { background-color: #404358; }
