:root {
    --mf-teal: #079d98;
    --mf-deep: #075f5b;
    --mf-mint: #e7fbf5;
    --mf-shadow: 0 18px 45px rgba(5, 72, 68, .28);
}

.mf-actions {
    display: none;
}

@media (max-width: 900px) {
    body {
        padding-bottom: calc(82px + env(safe-area-inset-bottom));
    }

    .mf-actions {
        position: fixed;
        z-index: 500;
        left: 12px;
        right: 12px;
        bottom: max(10px, env(safe-area-inset-bottom));
        display: grid;
        grid-template-columns: .82fr 1.18fr;
        gap: 7px;
        padding: 7px;
        border: 1px solid rgba(7, 157, 152, .18);
        border-radius: 22px;
        background: rgba(255, 255, 255, .94);
        box-shadow: var(--mf-shadow);
        font-family: Manrope, Arial, sans-serif;
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }

    .mf-actions a {
        min-width: 0;
        min-height: 58px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        padding: 8px 11px;
        border-radius: 16px;
        color: #fff;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        transition: transform .2s ease, box-shadow .2s ease;
    }

    .mf-actions a:active {
        transform: scale(.97);
    }

    .mf-call {
        background: linear-gradient(135deg, var(--mf-deep), var(--mf-teal));
        box-shadow: 0 9px 22px rgba(7, 120, 114, .22);
    }

    .mf-book {
        background: linear-gradient(135deg, #079d98, #35bc96);
        box-shadow: 0 9px 22px rgba(28, 164, 135, .22);
    }

    .mf-icon {
        width: 36px;
        height: 36px;
        display: grid;
        flex: 0 0 auto;
        place-items: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, .17);
        font-size: 16px;
    }

    .mf-call .mf-icon {
        animation: mfPhoneRing 3.4s ease-in-out infinite;
    }

    .mf-copy {
        min-width: 0;
        display: grid;
        line-height: 1.08;
    }

    .mf-copy small {
        margin-bottom: 4px;
        color: rgba(255, 255, 255, .72);
        font-size: 8px;
        font-weight: 700;
        letter-spacing: .04em;
    }

    .mf-copy strong {
        overflow: hidden;
        font-size: 12px;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Lift the existing helpers above the mobile action dock. */
    .xf-whatsapp-float {
        bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .xf-back-top {
        bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .nc-assistant {
        bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .nc-assistant.open {
        z-index: 700;
    }

    .nc-assistant.open .nc-panel {
        bottom: calc(84px + env(safe-area-inset-bottom));
        height: min(680px, calc(100dvh - 105px - env(safe-area-inset-bottom)));
    }
}

@media (max-width: 390px) {
    .mf-actions {
        left: 8px;
        right: 8px;
        grid-template-columns: .78fr 1.22fr;
    }

    .mf-actions a {
        gap: 6px;
        padding-inline: 8px;
    }

    .mf-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .mf-copy small {
        display: none;
    }

    .mf-copy strong {
        font-size: 11px;
    }
}

@keyframes mfPhoneRing {
    0%, 76%, 100% { transform: rotate(0); }
    80% { transform: rotate(-10deg); }
    84% { transform: rotate(10deg); }
    88% { transform: rotate(-7deg); }
    92% { transform: rotate(7deg); }
    96% { transform: rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
    .mf-actions *,
    .mf-actions *::before,
    .mf-actions *::after {
        animation: none !important;
        transition: none !important;
    }
}
