/* 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.
   The product-card CTA was a <button> when this rule was written; it later
   became an <a> for SEO crawlability (real href, htmx layered on top),
   which silently broke this selector. Cover both so it can't regress again. */
.filter-btn,
article a[hx-get^='/product/'],
article button[hx-get^='/product/'] {
  min-height: 44px;
}

/* Header/mobile-menu nav links measured 36-40px tall, under the 44px
   minimum, on every page (they were never covered by any touch-target
   rule). */
header nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.filter-btn:hover {
  background: #eaf4fb;
}
.filter-btn[aria-pressed='true'] {
  background: #1b3d6d;
  border-color: #1b3d6d;
  color: #ffffff;
}

/* Blog article text (lib/blog-posts.js bodies). The Tailwind Play CDN has
   no typography plugin, so the long-form styles live here. */
.article-body {
  color: #334155;
  font-size: 1.0625rem;
  line-height: 1.75;
}
.article-body > * + * {
  margin-top: 1.1em;
}
.article-body h2 {
  margin-top: 2em;
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1b3d6d;
}
.article-body h3 {
  margin-top: 1.6em;
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1b3d6d;
}
.article-body ul,
.article-body ol {
  padding-left: 1.4em;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li + li { margin-top: 0.5em; }
.article-body li::marker { color: #2e7bc4; }
.article-body strong { color: #1b3d6d; font-weight: 600; }
.article-body a,
.faq-answer a {
  color: #2568a8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-body a:hover,
.faq-answer a:hover { color: #1b3d6d; }
.article-body .article-note {
  margin-top: 2.5em;
  border-radius: 0.75rem;
  background: #eaf4fb;
  padding: 0.9rem 1.1rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #475569;
}

/* FAQ accordion: hide the default disclosure triangle (we draw a plus). */
.faq-item summary::-webkit-details-marker { display: none; }

/* 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;
  }
}
