/*
 * AutoMart Mobile Vehicle Detail V42.16
 * FINAL MOBILE STICKY CONTACT DOCK
 *
 * Purpose:
 * - Move vehicle quick-contact actions out of normal document flow
 * - Keep Call / WhatsApp / Chat fixed above mobile bottom navigation
 * - Hide the oversized desktop-style vehicle/seller information inside
 *   the floating module on mobile
 * - Preserve desktop behaviour
 */

@media (max-width: 767.98px) {

    /* =========================================================
       FIXED MOBILE CONTACT DOCK
       ========================================================= */

    .am-v438-floating-contact {
        position: fixed !important;

        top: auto !important;
        right: 10px !important;
        bottom: calc(
            72px + env(safe-area-inset-bottom, 0px)
        ) !important;
        left: 10px !important;

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

        margin: 0 !important;
        padding: 0 !important;

        display: block !important;

        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;

        z-index: 99990 !important;

        pointer-events: none !important;

        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
    }


    /* =========================================================
       PREMIUM DOCK CONTAINER
       ========================================================= */

    .am-v438-floating-contact__inner {
        width: 100% !important;

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

        display: block !important;

        background: rgba(255, 255, 255, 0.98) !important;

        border: 1px solid #e4ebe7 !important;
        border-radius: 18px !important;

        box-shadow:
            0 10px 28px rgba(15, 35, 28, 0.16),
            0 2px 8px rgba(15, 35, 28, 0.08) !important;

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


    /* =========================================================
       REMOVE LARGE DESKTOP INFORMATION FROM MOBILE DOCK
       ========================================================= */

    .am-v438-floating-contact__vehicle,
    .am-v438-floating-contact__price,
    .am-v438-floating-contact__seller {
        display: none !important;
    }


    /* =========================================================
       THREE ACTIONS
       ========================================================= */

    .am-v438-floating-contact__actions {
        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        display: grid !important;

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

        gap: 7px !important;
    }


    .am-v438-floating-contact__actions > a {
        min-width: 0 !important;
        min-height: 48px !important;

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

        display: flex !important;

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

        gap: 6px !important;

        border-radius: 13px !important;

        text-decoration: none !important;

        font-size: 12px !important;
        font-weight: 700 !important;

        line-height: 1 !important;

        pointer-events: auto !important;

        box-sizing: border-box !important;

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


    .am-v438-floating-contact__actions > a:active {
        transform: scale(.97) !important;
    }


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

    .am-v438-action-icon {
        width: 20px !important;
        height: 20px !important;

        flex: 0 0 20px !important;

        display: inline-flex !important;

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

        font-size: 17px !important;
        line-height: 1 !important;
    }


    /* Hide descriptive text — keep only Call / WhatsApp / Chat */

    .am-v438-floating-contact__actions small {
        display: none !important;
    }


    .am-v438-floating-contact__actions b {
        display: inline-block !important;

        font-size: 12px !important;
        font-weight: 800 !important;

        white-space: nowrap !important;
    }


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

    .am-v438-floating-contact__call {
        background: #0b9b62 !important;
        color: #ffffff !important;

        border: 1px solid #0b9b62 !important;

        box-shadow:
            0 5px 14px rgba(11, 155, 98, 0.18) !important;
    }


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

    .am-v438-floating-contact__whatsapp {
        background: #ffffff !important;
        color: #087d50 !important;

        border: 1px solid #bfe5d4 !important;
    }


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

    .am-v438-floating-contact__chat {
        background: #f3f6f5 !important;
        color: #17231f !important;

        border: 1px solid #dce5e1 !important;
    }


    /* =========================================================
       MAKE SURE THE PAGE CAN SCROLL PAST THE DOCK
       ========================================================= */

    main {
        padding-bottom:
            calc(92px + env(safe-area-inset-bottom, 0px)) !important;
    }


    /* =========================================================
       KEEP GLOBAL MOBILE NAV ABOVE PAGE CONTENT
       ========================================================= */

    .mobile-bottom {
        z-index: 99980 !important;
    }
}


/* =============================================================
   EXTRA SMALL DEVICES
   ============================================================= */

@media (max-width: 360px) {

    .am-v438-floating-contact {
        right: 7px !important;
        left: 7px !important;
        bottom: calc(
            70px + env(safe-area-inset-bottom, 0px)
        ) !important;
    }

    .am-v438-floating-contact__inner {
        padding: 6px !important;
        border-radius: 16px !important;
    }

    .am-v438-floating-contact__actions {
        gap: 5px !important;
    }

    .am-v438-floating-contact__actions > a {
        min-height: 46px !important;
        padding: 7px 4px !important;
        border-radius: 12px !important;
    }

    .am-v438-floating-contact__actions b {
        font-size: 11px !important;
    }

    .am-v438-action-icon {
        width: 18px !important;
        height: 18px !important;
        flex-basis: 18px !important;
        font-size: 15px !important;
    }
}
