/*
 * Touch, the same on every page and every device — phones, tablets and touch-screen laptops / desktops (owner
 * 2026-10-24: "touch screen laptop desktop bhi hote hai to touch sensitivity common file bana lo"). Loaded in every
 * <head> by views/shared/favicon.php, so the sign-in, PIN and unlock pages (no hrpm-theme.css) have it too. That
 * partial comes before bootstrap.css, hence the :root in front of each rule.
 *
 *  - A tap acts at once: no wait for a possible double-tap zoom. Pinch-zoom stays (never touch-action: none —
 *    people with low vision zoom; MDN touch-action).
 *  - Sideways scrolling of a wide table or a tab strip stops at its edge instead of becoming the browser's
 *    swipe-back (overscroll-behavior-x).
 *  - any-pointer: coarse = a finger can be used on this device at all — a touch laptop has a mouse too, so this, not
 *    pointer: coarse. Hit areas then reach 44 px (WCAG 2.5.5; a -sm button ~36 px, still above the 24 px of 2.5.8).
 *  - No hover on a finger: a pressed control shows it is pressed.
 */
:root { touch-action: manipulation; }
:root .table-responsive, :root .nav-tabs, :root .overflow-auto, :root [data-scroll-x] { overscroll-behavior-x: contain; }

@media (any-pointer: coarse) {
    /* Taller by padding, not min-height: a link styled as a button keeps its text in the middle. ~44 px / ~36 px. */
    :root .btn, :root .page-link { padding-top: .55rem; padding-bottom: .55rem; }
    :root .dropdown-item, :root .list-group-item-action { padding-top: .6rem; padding-bottom: .6rem; }
    :root .btn-sm, :root .btn-group-sm > .btn { padding-top: .45rem; padding-bottom: .45rem; }
    :root .form-check-input { width: 1.25em; height: 1.25em; }
    :root .form-switch .form-check-input { width: 2.25em; }
    :root .btn-close { padding: .75em; }
}

@media (hover: none) {
    :root .btn:active, :root .dropdown-item:active, :root .nav-link:active, :root .list-group-item-action:active { filter: brightness(.92); }
}
