/* AFILCOR_MOBILE_GESTURES_V1 (owner-directed 2026-11-15): one touch policy for the public, member, auth, payment and admin
   layouts. Presentation only. The viewport tags stay accessible (no user-scalable=no, no maximum-scale), so pinch zoom and
   browser text scaling keep working.

   1. Touch screens only (pointer: coarse); desktop mice and trackpads are untouched. Controls get touch-action: manipulation,
      which turns off double-tap-to-zoom on them but keeps panning and pinch zoom. touch-action combines with the ancestors',
      so links and buttons inside a carousel that sets pan-y (slick, the dashboard card stack) still hand sideways swipes to
      its script, and links inside horizontally scrolling tables still scroll. Text selection is not affected. */
@media (pointer: coarse) {
    a[href],
    button,
    summary,
    label,
    select,
    [role="button"],
    [data-bs-toggle],
    .btn,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    input[type="checkbox"],
    input[type="radio"] {
        touch-action: manipulation;
    }
}

/* 1b. Three swipe carousels set touch-action: pan-y, which also switched pinch zoom off whenever a pinch started on them
       (verified 2026-11-15: the dashboard card stack stayed at scale 1). pinch-zoom is added back; single-finger sideways
       swipes still go to their scripts and vertical scrolling is unchanged. !important beats the later page styles. */
@media (pointer: coarse) {
    .wc .wc-detail,
    .slick-slider {
        touch-action: pan-y pinch-zoom !important;
    }
}

/* 2. iOS Safari zooms the whole page when a text field under 16px is focused, and the page stays zoomed after the keyboard
      closes. These are the only fields under 16px found on 23 pages at 320-1024px (2026-11-15): the referral link, the
      project share link, the footer newsletter e-mail and the admin search. They are lifted to 16px on iOS only
      (-webkit-touch-callout exists only there), so Android and desktop keep their current look. */
@supports (-webkit-touch-callout: none) {
    @media (pointer: coarse) {
        #agroReferralUrl,
        input.copyURL,
        #newsletter-email,
        #searchInput.navbar-search-field {
            font-size: 16px !important;
        }
    }
}
