/* ============================================================
   Garaged — global safety net
   ------------------------------------------------------------
   Safe to include in EVERY template, including the older ones that
   carry their own complete inline stylesheet.

   Deliberately contains no typography, layout or component rules:
   those belong in app.css, whose generic class names (.card, .btn,
   .badge…) and body defaults would otherwise silently override
   whatever a legacy template didn't happen to declare.
   ============================================================ */

/* iOS Safari zooms the page in when a focused input is under 16px, leaving the
   user to pinch back out. Key this off touch input rather than viewport width —
   an iPad in landscape is 1024px wide but is still a touch device. */
@media (hover: none) and (pointer: coarse) {
    input, textarea, select { font-size: 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Pull-to-refresh indicator (static/app.js) ────────────────
   Self-contained and namespaced, so it can't collide with anything. */
.ptr-indicator {
    position: fixed;
    top: -44px; left: 50%;
    transform: translateX(-50%);
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    border: 1px solid #E5E8EE;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(16,19,26,0.04), 0 6px 16px rgba(16,19,26,0.06);
    opacity: 0;
    z-index: 900;
    pointer-events: none;
}
.ptr-indicator.is-snapping { transition: transform .2s ease, opacity .2s ease; }
.ptr-spinner {
    width: 16px; height: 16px;
    border: 2px solid #D0D5DE;
    border-top-color: var(--brand, #CC0000);
    border-radius: 50%;
}
.ptr-indicator.is-ready .ptr-spinner { border-right-color: var(--brand, #CC0000); }
.ptr-indicator.is-loading .ptr-spinner { animation: ptr-spin .6s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .ptr-indicator.is-loading .ptr-spinner { animation: none; }
}
