/* ============================================================
   tweaks.css — minimal overrides Tailwind cannot express cleanly.
   Keep this file under 50 lines. Everything else stays in utility
   classes inside the templates.
   ============================================================ */

/* Hide Alpine.js elements until the runtime takes over,
   preventing a flash of unstyled content. */
[x-cloak] { display: none !important; }

/* Slightly tighter focus ring than Tailwind's default ring-offset,
   keyed to the primary palette declared in base.html. */
:focus-visible {
  outline: 2px solid #1e40af;
  outline-offset: 2px;
  border-radius: 6px;
}

/* Reset the default outline for elements that already have a
   Tailwind focus:ring utility — avoids double rings. */
.focus\:ring-2:focus-visible { outline: none; }

/* Custom thin scrollbar for sidebars and dense panels. */
.overflow-y-auto::-webkit-scrollbar,
.overflow-x-auto::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.overflow-y-auto::-webkit-scrollbar-thumb,
.overflow-x-auto::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.25);
  border-radius: 8px;
}
.overflow-y-auto::-webkit-scrollbar-thumb:hover,
.overflow-x-auto::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.45);
}
.overflow-y-auto::-webkit-scrollbar-track,
.overflow-x-auto::-webkit-scrollbar-track {
  background: transparent;
}

/* Honour reduced motion preferences — disable our custom 180ms
   transitions entirely for users who opt out. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
