/**
 * TahfeezM shared motion layer — V43 stability edition.
 * Content is always visible. Motion is a tiny progressive enhancement only.
 */

:root {
  --site-motion-fast: 140ms;
  --site-motion-base: 210ms;
  --site-motion-ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

/*
 * V42 compatibility / fail-safe:
 * Old reveal classes must never be able to hide page content, even when JS,
 * IntersectionObserver, AJAX, or a third-party script fails midway.
 */
body .site-motion-reveal,
body .site-motion-item,
body .site-motion-reveal.is-site-visible,
body [data-site-motion-group] > .site-motion-item,
body [data-site-motion-new] {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  filter: none !important;
  animation: none !important;
  transition-delay: 0ms !important;
}

/* One tiny entrance for a few already-visible top-level page blocks. */
.site-motion-soft-enter {
  animation: site-motion-soft-enter var(--site-motion-base) var(--site-motion-ease) both;
  animation-delay: var(--site-motion-soft-delay, 0ms);
}

@keyframes site-motion-soft-enter {
  from {
    transform: translate3d(0, 4px, 0);
  }
  to {
    transform: none;
  }
}

/* Keep interactions calm: color/shadow only, never move the layout on hover. */
:where(body.site-motion-enabled) :where([data-site-motion-surface]) {
  transition:
    box-shadow var(--site-motion-fast) ease,
    border-color var(--site-motion-fast) ease,
    background-color var(--site-motion-fast) ease;
}

:where(body.site-motion-enabled) :where(.btn, button, [role="button"], .nav-link, .dropdown-item) {
  transition:
    background-color var(--site-motion-fast) ease,
    border-color var(--site-motion-fast) ease,
    color var(--site-motion-fast) ease,
    box-shadow var(--site-motion-fast) ease;
}

:where(body.site-motion-enabled) :where(input, select, textarea, .form-control, .form-select) {
  transition:
    border-color var(--site-motion-fast) ease,
    box-shadow var(--site-motion-fast) ease,
    background-color var(--site-motion-fast) ease;
}

:where(body.site-motion-enabled) :where(.table, table) tbody tr {
  transition: background-color var(--site-motion-fast) ease;
}

@media (hover: hover) and (pointer: fine) {
  :where(body.site-motion-enabled) :where(.table, table) tbody tr:hover {
    background-color: rgba(17, 94, 89, 0.025);
  }
}

@media (max-width: 767.98px) {
  :root {
    --site-motion-base: 170ms;
  }

  @keyframes site-motion-soft-enter {
    from {
      transform: translate3d(0, 2px, 0);
    }
    to {
      transform: none;
    }
  }
}

@media print, (prefers-reduced-motion: reduce) {
  .site-motion-soft-enter,
  .site-motion-reveal,
  .site-motion-item,
  [data-site-motion-new] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
  }
}
