/* Floating call + WhatsApp buttons — Master Wash (carwashkw.com)
   Source file: scripts/float-ctas.css — build a hashed copy into /css/ with
   scripts/inject-float-ctas.mjs. Do not edit the hashed copy directly. */

.float-ctas {
    position: fixed;
    z-index: 998; /* below .navbar (1000) and mobile drawer, above page content */
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    inset-inline-end: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    /* Hidden by default — float-ctas.js reveals this once the hero has
       scrolled out of view (or immediately on pages with no hero). Uses
       visibility, not just opacity, so the buttons can't be clicked or
       tab-focused while hidden. */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.float-ctas.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0s;
}

@media (prefers-reduced-motion: reduce) {
    .float-ctas {
        transition: opacity 0.01s linear, visibility 0s linear 0.01s;
        transform: none;
    }
    .float-ctas.visible {
        transition: opacity 0.01s linear, visibility 0s linear 0s;
        transform: none;
    }
}

.float-btn {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full, 9999px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--white, #fff);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.float-btn svg {
    width: 26px;
    height: 26px;
    pointer-events: none;
}

.float-call {
    background: linear-gradient(135deg, var(--accent, #3DADE8), var(--accent-dark, #2A9AD6));
}

.float-wa {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.float-btn:hover,
.float-btn:focus-visible {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04));
    color: var(--white, #fff);
}

.float-btn:focus-visible {
    outline: 3px solid var(--accent, #3DADE8);
    outline-offset: 2px;
}

/* Smaller and further from the edge on desktop — mobile is the primary surface */
@media (min-width: 768px) {
    .float-ctas {
        bottom: 1.5rem;
        inset-inline-end: 1.5rem;
        gap: 0.625rem;
    }

    .float-btn {
        width: 48px;
        height: 48px;
    }

    .float-btn svg {
        width: 22px;
        height: 22px;
    }
}

/* Keep clear of the mobile nav drawer when it's open (toggled by float-ctas.js,
   which mirrors the existing #mobileMenuToggle / .nav-menu.active state) */
.float-ctas.is-nav-open {
    display: none;
}
