#wa-preview {
    font-family: Arial, sans-serif;
    color: light-dark(#182d28, #e4eee9);
    color-scheme: light dark
}

#wa-preview * {
    box-sizing: border-box
}

#wa-preview .wa-toolbar,
#wa-preview .wa-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 4px;
    font-size: 12px
}

#wa-preview .wa-toolbar button {
    padding: 10px 14px;
    border: 1px solid light-dark(#d8e2dc, #3e5149);
    background: light-dark(#fff, #20312a);
    color: inherit;
    border-radius: 9px;
    cursor: pointer
}

#wa-preview .wa-stage {
    position: relative;
    height: 250px
}

#wa-preview .wa-widget {
    position: absolute;
    right: 20px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 9999
}

#wa-preview .wa-button {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 62px;
    height: 62px;
    border-radius: 22px;
    background: #20c76a;
    box-shadow: 0 8px 24px #05643130;
    color: #fff;
    text-decoration: none;
    transform-origin: 50% 65%;
    cursor: pointer
}

#wa-preview .wa-button img {
    filter: brightness(0) invert(1);
    display: block
}

#wa-preview .wa-dot {
    position: absolute;
    right: -4px;
    top: -4px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    background: #f97316;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1
}

#wa-preview .wa-bubble {
    position: relative;
    display: flex;
    align-items: center;
    background: light-dark(#fff, #011909);
    color: light-dark(#192e24, #f2fff5);
    border-radius: 17px;
    box-shadow: 0 5px 28px #052f1817;
    transform-origin: right center;
    animation: wa-arrive .3s ease-out both
}

#wa-preview .wa-bubble[hidden] {
    display: none
}

#wa-preview .wa-bubble:after {
    content: "";
    position: absolute;
    right: -6px;
    top: calc(50% - 6px);
    width: 12px;
    height: 12px;
    transform: rotate(45deg);
    background: inherit
}

#wa-preview .wa-message {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 17px 0 17px 19px;
    text-decoration: none;
    color: inherit;
    cursor: pointer
}

#wa-preview .wa-eyebrow {
    font-size: 11px;
    opacity: .7
}

#wa-preview .wa-message strong {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap
}

#wa-preview .wa-close {
    align-self: flex-start;
    position: relative;
    z-index: 1;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 20px;
    cursor: pointer
}

#wa-preview .wa-shake {
    animation: wa-ring .65s linear both
}

#wa-preview .wa-leave {
    animation: wa-depart .2s ease-in both;
    pointer-events: none
}

#wa-preview .wa-status {
    margin: 0;
    font-size: 12px;
    min-height: 18px
}

#wa-preview :focus-visible {
    outline: 3px solid #17894c;
    outline-offset: 5px
}

@keyframes wa-ring {

    0%,
    100% {
        transform: translateX(0) rotate(0)
    }

    10% {
        transform: translateX(-2px) rotate(-10deg)
    }

    20% {
        transform: translateX(2px) rotate(9deg)
    }

    30% {
        transform: translateX(-2px) rotate(-9deg)
    }

    40% {
        transform: translateX(2px) rotate(8deg)
    }

    50% {
        transform: translateX(-1px) rotate(-6deg)
    }

    60% {
        transform: translateX(1px) rotate(5deg)
    }

    75% {
        transform: translateX(-1px) rotate(-3deg)
    }

    90% {
        transform: translateX(1px) rotate(2deg)
    }
}

@keyframes wa-arrive {
    from {
        opacity: 0;
        transform: translateX(10px) translateY(4px)
    }

    to {
        opacity: 1;
        transform: translate(0)
    }
}

@keyframes wa-depart {
    to {
        opacity: 0;
        transform: translateX(8px)
    }
}

@media(max-width:380px) {
    #wa-preview .wa-widget {
        right: 8px;
        gap: 10px
    }

    #wa-preview .wa-button {
        width: 56px;
        height: 56px;
        border-radius: 20px
    }

    #wa-preview .wa-message {
        padding-left: 13px
    }

    #wa-preview .wa-message strong {
        font-size: 14px
    }
}

@media(prefers-reduced-motion:reduce) {

    #wa-preview .wa-shake,
    #wa-preview .wa-bubble,
    #wa-preview .wa-leave {
        animation: none
    }
}

/* Posición flotante para el sitio real */
#wa-preview .wa-stage {
    height: 0
}

#wa-preview .wa-widget {
    position: fixed;
    right: max(24px, env(safe-area-inset-right));
    bottom: max(24px, env(safe-area-inset-bottom));
    max-width: calc(100vw - 32px)
}

#wa-preview .wa-status {
    position: fixed;
    bottom: 100px;
    right: 24px;
    background: #fff;
    color: #182d28;
    max-width: 270px
}
