/* Life Line Enterprises — small custom layer on top of Tailwind (Play CDN). */

html {
  scroll-behavior: smooth;
}

/* htmx loading indicators */
.htmx-indicator {
  opacity: 0;
  transition: opacity 150ms ease-in;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 9999px;
  vertical-align: -0.125em;
  animation: llspin 0.6s linear infinite;
}
@keyframes llspin {
  to {
    transform: rotate(360deg);
  }
}

/* Keyboard focus — visible on every interactive element (WCAG 2.4.7) */
:focus-visible {
  outline: 3px solid #2e7bc4;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Product filter buttons — active state toggled via aria-pressed */
.filter-btn {
  border: 1px solid #b3d6ef;
  background: #ffffff;
  color: #1b3d6d;
}

/* WCAG touch-target minimum (44px) for tap controls that measured under it */
.filter-btn,
article button[hx-get^='/product/'] {
  min-height: 44px;
}
.filter-btn:hover {
  background: #eaf4fb;
}
.filter-btn[aria-pressed='true'] {
  background: #1b3d6d;
  border-color: #1b3d6d;
  color: #ffffff;
}

/* Lock page scroll while the product modal is open */
body.modal-open {
  overflow: hidden;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
