/* Checkilo — supplementary CSS (animations + a11y helpers + prose).
   Most styling is via Tailwind utilities; this file is for what utilities can't express. */

/* ── Flash message animations ───────────────────────────────────────────── */
@keyframes flash-slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes flash-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
.flash-enter { animation: flash-slide-in 0.3s ease-out; }
.flash-exit  { animation: flash-fade-out 0.3s ease-out forwards; }

/* ── Status pulse — for live "in progress" indicators ──────────────────── */
@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
.status-pulse { animation: status-pulse 2s ease-in-out infinite; }

/* ── Skeleton shimmer — for loading-state placeholders ─────────────────── */
@keyframes skeleton-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #F1F5F9 0%, #E2E8F0 50%, #F1F5F9 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  border-radius: 6px;
}

/* ── Reduced motion: disable every animation defined here ──────────────── */
@media (prefers-reduced-motion: reduce) {
  .flash-enter, .flash-exit, .status-pulse, .skeleton { animation: none; }
}

/* ── Mobile bottom-bar safe-area-inset on iPhone home-indicator ────────── */
.safe-area-bottom { padding-bottom: env(safe-area-inset-bottom, 0px); }

/* ── Click-to-select for ping URLs ─────────────────────────────────────── */
.select-all-text { user-select: all; cursor: pointer; }

/* ── Skip-to-main-content link (visible only when keyboard-focused) ────── */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: #1E293B; color: #fff; padding: 10px 14px; border-radius: 6px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ── Focus ring — used everywhere via the .focus-ring helper ───────────── */
.focus-ring:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

/* ── Mono helper (some inline contexts can't use Tailwind's font-mono) ── */
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ── Inner card surface for nested content (ping-URL block, runbook box) ─ */
.surface-soft { background: #F8FAFC; border: 1px solid #E2E8F0; }

/* ── Markdown article styling (used by /help/{slug} body_html) ─────────── */
.prose-help h1 { font-size: 1.75rem; font-weight: 700; color: #1E293B; margin: 0 0 .5rem; letter-spacing: -0.01em; }
.prose-help h2 { font-size: 1.25rem; font-weight: 600; color: #1E293B; margin: 2rem 0 .75rem; }
.prose-help h3 { font-size: 1rem;    font-weight: 600; color: #1E293B; margin: 1.5rem 0 .5rem; }
.prose-help p, .prose-help li { color: #1E293B; line-height: 1.7; }
.prose-help p { margin: 0 0 1rem; }
.prose-help ul { list-style: disc;    padding-left: 1.25rem; margin: 0 0 1rem; }
.prose-help ol { list-style: decimal; padding-left: 1.25rem; margin: 0 0 1rem; }
.prose-help code {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.875rem;
  background: #F1F5F9; color: #1E293B; padding: 1px 6px; border-radius: 4px; border: 1px solid #E2E8F0;
}
.prose-help pre {
  background: #0F172A; color: #E2E8F0; padding: 1rem 1.25rem; border-radius: 8px;
  overflow-x: auto; margin: 0 0 1rem;
}
.prose-help pre code { background: transparent; color: inherit; padding: 0; border: 0; font-size: .9rem; }
.prose-help blockquote {
  border-left: 3px solid #DBEAFE; padding-left: 1rem; color: #475569;
  font-style: italic; margin: 0 0 1rem;
}
.prose-help a {
  color: #2563EB; text-decoration: underline;
  text-decoration-color: #DBEAFE; text-underline-offset: 3px;
}
.prose-help a:hover { text-decoration-color: #2563EB; }
.prose-help img { max-width: 100%; border-radius: 8px; border: 1px solid #E2E8F0; }
.prose-help img.broken {
  background: #F8FAFC; padding: 2rem; text-align: center; color: #64748B;
  border: 1px dashed #CBD5E1; font-size: .875rem;
}

/* ── Hide scrollbars on tab strips while keeping keyboard scrollability ── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }
