/*
 * AutoMart Mobile Vehicle Detail V42.24
 *
 * FINAL MOBILE CONTACT AUTHORITY
 *
 * Uses the existing vehicle-page Call / WhatsApp / Chat
 * actions as the visual and functional source.
 *
 * Mobile vehicle-detail only.
 * Desktop/tablet untouched.
 */

@media (max-width: 767.98px) {

    /* =========================================================
       VEHICLE DETAIL IDENTIFIER
       ========================================================= */

    html body:has(.vehicle-detail-page),
    html body.am-v424-vehicle-detail {

        /*
         * Reserve enough scrolling clearance for the fixed
         * contact dock.
         */
        padding-bottom:
            calc(
                92px +
                env(safe-area-inset-bottom, 0px)
            ) !important;
    }


    /* =========================================================
       REMOVE GLOBAL MOBILE NAV ON VEHICLE DETAIL
       ========================================================= */

    html body:has(.vehicle-detail-page) nav.mobile-bottom,
    html body:has(.vehicle-detail-page) .mobile-bottom,
    html body.am-v424-vehicle-detail nav.mobile-bottom,
    html body.am-v424-vehicle-detail .mobile-bottom {

        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        opacity: 0 !important;
        pointer-events: none !important;
        overflow: hidden !important;
    }


    /* =========================================================
       RETIRE OLD V438 FLOATING CONTACT
       ========================================================= */

    html body:has(.vehicle-detail-page)
    .am-v438-floating-contact,

    html body.am-v424-vehicle-detail
    .am-v438-floating-contact {

        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }


    /* =========================================================
       FINAL STICKY ACTION BAR
       ========================================================= */

    html body .am-v424-sticky-actions {

        position: fixed !important;

        left: 10px !important;
        right: 10px !important;

        bottom:
            calc(
                10px +
                env(safe-area-inset-bottom, 0px)
            ) !important;

        top: auto !important;

        width: auto !important;
        max-width: none !important;

        margin: 0 !important;

        padding: 6px !important;

        box-sizing: border-box !important;

        display: grid !important;

        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;

        gap: 7px !important;

        align-items: stretch !important;

        background:
            rgba(255,255,255,.98) !important;

        border:
            1px solid #dfe8e3 !important;

        border-radius: 20px !important;

        box-shadow:
            0 14px 38px rgba(20,38,31,.18),
            0 3px 10px rgba(20,38,31,.08) !important;

        backdrop-filter:
            blur(18px) !important;

        -webkit-backdrop-filter:
            blur(18px) !important;

        z-index:
            2147483000 !important;

        visibility: visible !important;
        opacity: 1 !important;

        transform: none !important;
        -webkit-transform: none !important;

        pointer-events: auto !important;
    }


    /* =========================================================
       THREE EQUAL ACTION BUTTONS
       ========================================================= */

    html body .am-v424-sticky-actions
    .am-v461-action {

        min-width: 0 !important;

        width: 100% !important;

        min-height: 48px !important;
        height: 48px !important;

        margin: 0 !important;
        padding: 0 8px !important;

        box-sizing: border-box !important;

        display: flex !important;

        align-items: center !important;
        justify-content: center !important;

        gap: 7px !important;

        border-radius: 16px !important;

        text-decoration: none !important;

        font-family:
            inherit !important;

        font-size: 14px !important;
        line-height: 1 !important;

        font-weight: 850 !important;

        white-space: nowrap !important;

        overflow: hidden !important;

        transition:
            transform .16s ease,
            box-shadow .16s ease,
            background .16s ease !important;
    }


    /* =========================================================
       ACTION ICONS
       ========================================================= */

    html body .am-v424-sticky-actions
    .am-v461-action svg {

        width: 20px !important;
        height: 20px !important;

        flex:
            0 0 20px !important;

        display: block !important;
    }


    /* =========================================================
       CALL
       ========================================================= */

    html body .am-v424-sticky-actions
    .am-v461-action--call {

        background:
            #08a568 !important;

        color:
            #ffffff !important;

        border:
            1px solid #08a568 !important;

        box-shadow:
            0 7px 18px rgba(8,165,104,.20) !important;
    }


    /* =========================================================
       WHATSAPP
       ========================================================= */

    html body .am-v424-sticky-actions
    .am-v461-action--whatsapp {

        background:
            #ffffff !important;

        color:
            #087f52 !important;

        border:
            1px solid #bce7d4 !important;

        box-shadow:
            0 3px 12px rgba(20,38,31,.05) !important;
    }


    /* =========================================================
       CHAT
       ========================================================= */

    html body .am-v424-sticky-actions
    .am-v461-action--chat {

        background:
            #f3f6f5 !important;

        color:
            #17231f !important;

        border:
            1px solid #dce5e1 !important;

        box-shadow:
            none !important;
    }


    /* =========================================================
       TOUCH FEEDBACK
       ========================================================= */

    html body .am-v424-sticky-actions
    .am-v461-action:active {

        transform:
            translateY(1px) !important;
    }


    /* =========================================================
       EXTRA SMALL PHONES
       ========================================================= */

    @media (max-width: 360px) {

        html body .am-v424-sticky-actions {

            left: 7px !important;
            right: 7px !important;

            padding: 5px !important;

            gap: 5px !important;

            border-radius: 17px !important;
        }

        html body .am-v424-sticky-actions
        .am-v461-action {

            min-height: 46px !important;
            height: 46px !important;

            padding:
                0 5px !important;

            gap: 5px !important;

            font-size: 13px !important;

            border-radius: 14px !important;
        }

        html body .am-v424-sticky-actions
        .am-v461-action svg {

            width: 18px !important;
            height: 18px !important;

            flex-basis: 18px !important;
        }
    }
}


/* =============================================================
   DESKTOP / TABLET — COMPLETELY UNTOUCHED
   ============================================================= */

@media (min-width: 768px) {

    .am-v424-sticky-actions {
        display: none !important;
    }
}
