/**
 * SWADS app-like mobile shell
 * Loaded globally (partials/head + auth/landing). Prevents accidental text
 * selection and long-press callouts. Pull-to-refresh is locked only on the
 * customer /app shell — not on dashboard/admin pages (that trapped scroll).
 */

html {
    overscroll-behavior-x: none;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html,
body {
    -webkit-tap-highlight-color: transparent;
}

body {
    overscroll-behavior-x: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

/* Kill pull-to-refresh only inside Browse & Scan / customer chassis */
html:has(body.scan-customer),
body.scan-customer {
    overscroll-behavior-y: none;
}

/* Nested scroll panels: contain bounce so parent doesn't pull-refresh.
   Do NOT include .games-tron-shell — it must not become a scroll trap. */
.overflow-y-auto,
.overflow-auto,
.custom-scrollbar,
.horizontal-scroll-wrapper,
.main-content,
.app-layers,
.browse-sheet,
#scan-drawer {
    overscroll-behavior: contain;
}

/* Explicit copy targets (order IDs, phones, payment codes, SWADS ID) */
.selectable,
.selectable * {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
}

/* Inputs must remain selectable for paste / autofill / OTP */
input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
textarea,
select,
[contenteditable="true"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
}

/* iPhone saves a photo by long-pressing the picture itself. */
img.photo-save {
    -webkit-touch-callout: default !important;
    -webkit-user-select: auto !important;
    user-select: auto !important;
    pointer-events: auto !important;
    touch-action: auto !important;
}
