.caw-floating {
    --caw-offset-x: 25px;
    --caw-offset-y: 25px;
    position: fixed;
    z-index: 99999;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.4;
}

.caw-floating *,
.caw-floating *::before,
.caw-floating *::after {
    box-sizing: border-box;
}

.caw-position-bottom-right { right: var(--caw-offset-x); bottom: var(--caw-offset-y); }
.caw-position-bottom-left  { left: var(--caw-offset-x); bottom: var(--caw-offset-y); }
.caw-position-top-right    { right: var(--caw-offset-x); top: var(--caw-offset-y); }
.caw-position-top-left     { left: var(--caw-offset-x); top: var(--caw-offset-y); }

.caw-launcher-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.caw-position-bottom-right .caw-launcher-wrap,
.caw-position-top-right .caw-launcher-wrap {
    justify-content: flex-end;
}

.caw-position-bottom-left .caw-launcher-wrap,
.caw-position-top-left .caw-launcher-wrap {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.caw-launcher {
    position: relative;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 0;
    outline: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    cursor: pointer;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    -webkit-tap-highlight-color: transparent;
}

.caw-launcher:hover { transform: translateY(-2px); }
.caw-launcher:focus-visible { outline: 3px solid rgba(37, 211, 102, .25); outline-offset: 3px; }

.caw-launcher-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 31px;
    line-height: 1;
    transition: opacity .18s ease, transform .18s ease;
}

.caw-launcher-icon svg { display: block; }

.caw-launcher-close {
    position: absolute;
    width: 24px;
    height: 24px;
    opacity: 0;
    transform: rotate(-90deg) scale(.7);
    transition: opacity .18s ease, transform .18s ease;
}

.caw-launcher-close::before,
.caw-launcher-close::after {
    content: "";
    position: absolute;
    left: 11px;
    top: 2px;
    width: 2px;
    height: 20px;
    border-radius: 999px;
    background: #fff;
}

.caw-launcher-close::before { transform: rotate(45deg); }
.caw-launcher-close::after { transform: rotate(-45deg); }

.caw-floating.is-open .caw-launcher-icon { opacity: 0; transform: rotate(90deg) scale(.7); }
.caw-floating.is-open .caw-launcher-close { opacity: 1; transform: rotate(0) scale(1); }

.caw-has-pulse:not(.is-open) .caw-launcher::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    border: 2px solid currentColor;
    opacity: .32;
    animation: cawPulse 1.8s ease-out infinite;
}

@keyframes cawPulse {
    0% { transform: scale(1); opacity: .35; }
    75%, 100% { transform: scale(1.45); opacity: 0; }
}

.caw-launcher-label {
    position: relative;
    max-width: 220px;
    padding: 8px 12px;
    background: #fff;
    color: #333;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.25;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    transition: opacity .2s ease, transform .2s ease;
}

.caw-floating.is-open .caw-launcher-label {
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
}

.caw-popup {
    position: absolute;
    width: 350px;
    max-width: calc(100vw - 24px);
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 14px 45px rgba(18, 30, 47, .22);
    transform: translateY(12px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.caw-position-bottom-right .caw-popup,
.caw-position-bottom-left .caw-popup {
    bottom: calc(100% + 14px);
}

.caw-position-top-right .caw-popup,
.caw-position-top-left .caw-popup {
    top: calc(100% + 14px);
    transform: translateY(-12px) scale(.98);
    transform-origin: top right;
}

.caw-position-bottom-right .caw-popup,
.caw-position-top-right .caw-popup { right: 0; }

.caw-position-bottom-left .caw-popup,
.caw-position-top-left .caw-popup { left: 0; }

.caw-floating.is-open .caw-popup {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.caw-popup-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 19px 20px 18px;
    background: #25d366;
    color: #fff;
}

.caw-popup-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    min-height: 38px;
    font-size: 34px;
    line-height: 1;
}

.caw-popup-header-icon svg { width: 34px; height: 34px; display: block; }
.caw-popup-header-copy { min-width: 0; }
.caw-popup-title { margin: 0 0 4px; font-size: 18px; font-weight: 700; line-height: 1.25; color: #fff; }
.caw-popup-subtitle { font-size: 13px; line-height: 1.55; color: #fff; opacity: .95; }

.caw-popup-body {
    padding: 14px 18px 18px;
    max-height: min(62vh, 520px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.caw-response-text,
.caw-empty-text {
    margin: 1px 2px 14px;
    font-size: 12px;
    line-height: 1.45;
    color: #a0a8b4;
}

.caw-agents {
    display: grid;
    gap: 12px;
}

.caw-agent {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px 12px 12px;
    border: 0;
    border-left: 2px solid #25d366;
    background: #f4f6f8;
    color: inherit;
    text-decoration: none !important;
    border-radius: 4px;
    transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.caw-agent:hover {
    transform: translateY(-1px);
    background: #fff;
    box-shadow: 0 7px 20px rgba(28,39,49,.08);
}

.caw-agent:focus-visible {
    outline: 2px solid #25d366;
    outline-offset: 2px;
}

.caw-agent.is-offline { border-left-color: #b7bec8; }
.caw-agent.is-offline[aria-disabled="true"] { cursor: default; }
.caw-agent.is-hidden-offline,
.caw-agent.caw-limit-hidden { display: none !important; }

.caw-agent-avatar {
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 50%;
    background: #e6e9ed;
}

.caw-agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.caw-agent-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #667085;
}

.caw-agent-copy { min-width: 0; display: flex; flex-direction: column; }
.caw-agent-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #374151; font-size: 14px; font-weight: 500; line-height: 1.35; }
.caw-agent-role { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8a93a1; font-size: 11px; line-height: 1.35; }
.caw-agent-status { display: none; margin-top: 2px; font-size: 10px; line-height: 1.35; }
.caw-agent-status.has-text { display: block; }
.caw-agent-status.is-offline-text { color: #f59e0b; }
.caw-agent-status.is-online-text { color: #25d366; }

.caw-agent-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    color: #25d366;
    font-size: 21px;
    line-height: 1;
}

.caw-agent.is-offline .caw-agent-whatsapp { color: #b7bec8; }
.caw-agent-whatsapp svg { width: 21px; height: 21px; }

@media (min-width: 1025px) {
    .caw-hide-desktop { display: none !important; }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .caw-hide-tablet { display: none !important; }
}

@media (max-width: 767px) {
    .caw-hide-mobile { display: none !important; }

    .caw-floating {
        --caw-offset-x: 16px;
        --caw-offset-y: 16px;
    }

    .caw-popup {
        width: min(350px, calc(100vw - 24px));
    }

    .caw-popup-header { padding: 17px 16px 16px; }
    .caw-popup-body { padding: 13px 14px 15px; max-height: min(68vh, 520px); }
    .caw-launcher-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .caw-floating *,
    .caw-floating *::before,
    .caw-floating *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
