/*
 * Mobile sticky CTA bar
 * Two action buttons pinned to the bottom of the screen on phones.
 * Used on: tyre-fitting, mobile-car-tyre-replacement, flat-tyre-service.
 * Markup: <div class="mobile-cta-bar"> with two .mobile-cta-btn links.
 */

.mobile-cta-bar {
    display: none;
}

@media (max-width: 767.98px) {
    .mobile-cta-bar {
        display: flex;
        gap: 10px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        /* Below the navbar (1000) so the mobile menu opens over it */
        z-index: 998;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid #ececec;
        box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08);
    }

    .mobile-cta-btn {
        /* Size to the label, then share the leftover space */
        flex: 1 1 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 48px;
        padding: 8px 10px;
        border-radius: 6px;
        font-family: inherit;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.2;
        text-align: center;
        text-decoration: none;
        transition: background-color .15s ease, border-color .15s ease;
    }

    .mobile-cta-btn i {
        font-size: 16px;
        flex: none;
    }

    .mobile-cta-btn--primary,
    .mobile-cta-btn--primary:hover,
    .mobile-cta-btn--primary:focus {
        background: #000;
        border: 1px solid #000;
        color: #fff;
    }

    .mobile-cta-btn--primary:active {
        background: #222;
    }

    .mobile-cta-btn--secondary,
    .mobile-cta-btn--secondary:hover,
    .mobile-cta-btn--secondary:focus {
        background: #fff;
        border: 1px solid #cfcfcf;
        color: #000;
    }

    .mobile-cta-btn--secondary:active {
        background: #f3f3f3;
    }

    .mobile-cta-btn:focus-visible {
        outline: 2px solid #e9231c;
        outline-offset: 2px;
    }

    /* Keep the end of the page (footer) clear of the bar (bar = 72px + 1px border) */
    body {
        padding-bottom: calc(73px + env(safe-area-inset-bottom, 0px));
    }

    /* Lift the floating WhatsApp / call / location buttons above the bar */
    .whatsapp-button {
        bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    }

    .phone-button {
        bottom: calc(151px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .location-button,
    .mail-button {
        bottom: calc(216px + env(safe-area-inset-bottom, 0px));
    }
}
