.plal-whatsapp, .plal-whatsapp * { box-sizing: border-box; }
.plal-whatsapp {
    position: fixed;
    z-index: 1050;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: calc(100vw - 40px);
    color: #163b2a;
    text-decoration: none;
    font-family: Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}
.plal-whatsapp--left {
    right: auto;
    left: max(20px, env(safe-area-inset-left));
    flex-direction: row-reverse;
}
.plal-whatsapp__icon {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #128c4a;
    box-shadow: 0 5px 20px rgb(0 0 0 / 20%);
    transition: background .2s ease, box-shadow .2s ease;
}
.plal-whatsapp__icon img {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
}
.plal-whatsapp__bubble {
    position: relative;
    max-width: min(240px, calc(100vw - 114px));
    padding: 12px 16px;
    border: 1px solid #e2e8e4;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 20px rgb(0 0 0 / 12%);
    color: #163b2a;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    overflow-wrap: anywhere;
    white-space: pre-line;
}
.plal-whatsapp__bubble::after {
    content: '';
    position: absolute;
    right: -6px;
    top: calc(50% - 5px);
    width: 10px;
    height: 10px;
    border-top: 1px solid #e2e8e4;
    border-right: 1px solid #e2e8e4;
    background: #fff;
    transform: rotate(45deg);
}
.plal-whatsapp--left .plal-whatsapp__bubble::after {
    right: auto;
    left: -6px;
    transform: rotate(225deg);
}
.plal-whatsapp:hover { color: #163b2a; text-decoration: none; }
.plal-whatsapp:hover .plal-whatsapp__icon { background: #0b743c; box-shadow: 0 6px 24px rgb(0 0 0 / 26%); }
.plal-whatsapp:focus-visible { outline: 3px solid #66042c; outline-offset: 7px; border-radius: 14px; }
.plal-whatsapp--animated .plal-whatsapp__icon { animation: plal-whatsapp-nudge 7s ease-in-out infinite; }
.plal-whatsapp--animated .plal-whatsapp__bubble { animation: plal-whatsapp-greet 7s ease-in-out infinite; }
.plal-whatsapp:hover span, .plal-whatsapp:focus-visible span { animation-play-state: paused; }
@keyframes plal-whatsapp-nudge {
    0%, 18%, 100% { transform: rotate(0); }
    4%, 12% { transform: rotate(-7deg); }
    8%, 16% { transform: rotate(7deg); }
}
@keyframes plal-whatsapp-greet {
    0%, 20%, 100% { transform: translateY(0); }
    10% { transform: translateY(-5px); }
}
@media (max-width: 480px) {
    .plal-whatsapp { gap: 12px; }
    .plal-whatsapp__icon { flex-basis: 54px; width: 54px; height: 54px; }
    .plal-whatsapp__bubble { padding: 10px 12px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .plal-whatsapp span { animation: none !important; transition: none !important; }
}
