/* Courtesywide custom Tawk.to launcher.
   Icon-only by default, expands on hover/focus and sits above WhatsApp. */
.cw-support-launcher {
    position: fixed;
    right: 22px;
    left: auto;
    bottom: 84px;
    z-index: 1210;
    width: 52px;
    height: 52px;
    min-width: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    overflow: hidden;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--primary, #4fc143);
    color: #fff;
    box-shadow: 0 12px 30px rgba(15, 39, 66, .20);
    font: 800 12px/1.2 var(--site-font, "Kumbh Sans"), sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: width .22s ease, transform .2s ease, background-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.cw-support-launcher svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    flex: 0 0 20px;
    margin-left: 0;
}

.cw-support-launcher > span {
    display: block;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity .16s ease .04s, max-width .22s ease;
}

.cw-support-launcher:hover,
.cw-support-launcher:focus-visible {
    width: 205px;
    background: color-mix(in srgb, var(--primary, #4fc143) 86%, #17331a);
    transform: translateY(-2px);
    box-shadow: 0 15px 34px rgba(15, 39, 66, .25);
}

.cw-support-launcher:hover > span,
.cw-support-launcher:focus-visible > span {
    opacity: 1;
    max-width: 155px;
}

.cw-support-launcher:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary, #4fc143) 45%, #fff);
    outline-offset: 3px;
}

/* When the chat panel is open, remove both floating launchers from underneath it. */
body.cw-support-open .cw-support-launcher,
body.cw-support-open .floating-whatsapp {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (max-width: 1024px) {
    .cw-support-launcher {
        right: 14px;
        bottom: 74px;
        width: 50px;
        height: 50px;
        min-width: 50px;
        padding: 0 15px;
    }

    .cw-support-launcher:hover,
    .cw-support-launcher:focus-visible {
        width: min(205px, calc(100vw - 28px));
    }

    /* Detail pages have a full-width Request Quote button at the bottom.
       WhatsApp sits above it and support sits one level above WhatsApp. */
    body:has(.quote-mobile-footer-trigger) .floating-whatsapp {
        bottom: 80px !important;
    }

    body:has(.quote-mobile-footer-trigger) .cw-support-launcher {
        bottom: 140px !important;
    }
}

@media (max-width: 700px) {
    /* Touch screens remain icon-first; keyboard focus still exposes the label. */
    .cw-support-launcher:hover:not(:focus-visible) {
        width: 50px;
        transform: none;
    }

    .cw-support-launcher:hover:not(:focus-visible) > span {
        opacity: 0;
        max-width: 0;
    }
}
