/**
 * Mega Garage Management - Mobile App Native UX & Touch Polish Stylesheet
 * 
 * Enforces pure native-app feel:
 * 1. Zero web tap highlights (-webkit-tap-highlight-color: transparent)
 * 2. Zero accidental text selection when scrolling
 * 3. Zero callout context menus on long-press (-webkit-touch-callout: none)
 * 4. Contained overscroll behavior (prevents rubber-band conflict with SwipeRefreshLayout)
 * 5. Native inertia momentum touch scrolling
 * 6. Responsive safe-area notch and navigation padding
 */

@media (max-width:767px) {
    :root {
        --sat: env(safe-area-inset-top, 0px);
        --sab: env(safe-area-inset-bottom, 0px);
        --sal: env(safe-area-inset-left, 0px);
        --sar: env(safe-area-inset-right, 0px);
    }

    /* 1. Eliminate Tap Highlights Everywhere */
    *,
    *::before,
    *::after {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
        outline: none !important;
    }

    /* 2. Disable Long-Press Context Menus on Interactive Elements */
    img,
    a,
    button,
    .btn,
    .nav-link,
    .card {
        -webkit-touch-callout: none !important;
    }

    /* 3. Disable Accidental Text Selection across App Chrome & Navigation */
    html,
    body,
    header,
    nav,
    footer,
    button,
    .btn,
    .card,
    .card-header,
    .card-footer,
    .badge,
    .modal-header,
    .modal-footer,
    .sidebar-wrapper,
    .dropdown-menu,
    .nav-tabs,
    .nav-link,
    .table-responsive th {
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
    }

    /* 3.1 Preserve Selection on Inputs & Content that Users Need to Copy/Edit */
    input,
    textarea,
    select,
    [contenteditable="true"],
    .selectable,
    .user-select-text,
    .vehicle-no,
    .customer-number,
    .transaction-id,
    .referral-code-text {
        -webkit-user-select: text !important;
        -moz-user-select: text !important;
        -ms-user-select: text !important;
        user-select: text !important;
    }

    /* 5. Clean Mobile Scrollbar (Native Aesthetic) */
    body::-webkit-scrollbar,
    .overflow-auto::-webkit-scrollbar,
    .overflow-y-auto::-webkit-scrollbar,
    .no-scrollbar::-webkit-scrollbar {
        display: none !important;
        width: 0px !important;
        height: 0px !important;
    }

    body,
    .no-scrollbar {
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }

    /* 9. Clutter Suppression Inside Native Android Container */
    body.is-android-app .btn-app-download,
    body.is-android-app a[href*=".apk"],
    body.is-android-app .sidebar-body a[href*=".apk"],
    body.is-android-app .header-inner a[href*=".apk"] {
        display: none !important;
    }
}

/* 8. Top Native App Progress Bar for Dynamic SPA Transitions */
.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #3ddc84, #00e676, #00b0ff);
    z-index: 1000000;
    display: none;
    box-shadow: 0 0 10px rgba(61, 220, 132, 0.7);
    pointer-events: none;
}

.reset-link {
    font-size: 13px;
    font-weight: 600;
    color: #e53935;
    text-decoration: none !important;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(229, 57, 53, 0.08);
    transition: all 0.2s ease;
}

.reset-link:hover,
.reset-link:active {
    background: rgba(229, 57, 53, 0.16);
    color: #c62828;
}

