.contact-launcher {
    position: fixed;
    right: max(24px, env(safe-area-inset-right, 0px));
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    width: 54px;
    height: 54px;
    z-index: 1035;
}
.contact-channel, .contact-launcher-toggle {
    display: grid;
    place-items: center;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff !important;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.contact-launcher-toggle { position: relative; background: #426449; box-shadow: 0 5px 18px #42270c33; }
.contact-launcher.is-open .contact-launcher-toggle { background: #254c30; }
.contact-channel--phone { background: #e53935; font-size: 26px; }
.contact-channel--messenger { background: #1877f2; font-size: 29px; }
.contact-channel--whatsapp { background: #128c7e; font-size: 31px; }
.contact-channel i { display: flex; line-height: 1; }
.contact-channels {
    position: absolute;
    right: 0;
    bottom: 62px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100dvh - 152px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    scrollbar-width: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(12px) scale(.94);
    transform-origin: bottom center;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.contact-launcher.is-open .contact-channels { visibility: visible; opacity: 1; transform: none; pointer-events: auto; }
.contact-chat-icon { transition: transform .18s ease, opacity .18s ease; }
.contact-close-icon { position: absolute; width: 28px; height: 28px; opacity: 0; transform: rotate(-45deg); transition: opacity .18s ease, transform .18s ease; }
.contact-close-icon::before, .contact-close-icon::after { content: ''; position: absolute; top: 13px; left: 0; width: 28px; height: 2px; border-radius: 2px; background: #fff; transform: rotate(45deg); }
.contact-close-icon::after { transform: rotate(-45deg); }
.contact-launcher.is-open .contact-chat-icon { opacity: 0; transform: scale(.6); }
.contact-launcher.is-open .contact-close-icon { opacity: 1; transform: none; }
.scroll-top { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
body:has(.contact-launcher) .scroll-top { right: max(30px, calc(env(safe-area-inset-right, 0px) + 6px)); width: 42px; height: 42px; }
@media (hover: hover) { .contact-channel:not(:disabled):hover, .contact-launcher-toggle:hover { transform: translateY(-2px); box-shadow: 0 6px 18px #42270c29; } }
@media (max-width: 575.98px) {
    .contact-launcher { right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
    .contact-channels { max-height: calc(100dvh - 148px - env(safe-area-inset-bottom, 0px)); }
    body:has(.contact-launcher) .scroll-top { right: max(22px, calc(env(safe-area-inset-right, 0px) + 6px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
    body:has(main input:focus, main textarea:focus, main select:focus) .contact-launcher { visibility: hidden; opacity: 0; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) { .contact-launcher *, .contact-launcher *::before, .contact-launcher *::after { transition: none !important; } }

.contact-channel:disabled { opacity: 1; cursor: not-allowed; }

/* Theme link hover colors must not override the channel icons. */
body[data-page="home"][data-page][data-page] .contact-launcher :is(.contact-channel,.contact-launcher-toggle),
body[data-page="home"][data-page][data-page] .contact-launcher :is(.contact-channel,.contact-launcher-toggle):hover {color:#fff!important}
.contact-launcher :is(a,button):focus-visible{outline:3px solid #426449;outline-offset:4px}
