.ywa-wrap {
    position: fixed;
    bottom: var(--ywa-bottom, 24px);
    z-index: 999999;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    pointer-events: none;
}

.ywa-position-right {
    right: var(--ywa-side, 24px);
    flex-direction: row;
}

.ywa-position-left {
    left: var(--ywa-side, 24px);
    flex-direction: row-reverse;
}

.ywa-button {
    width: var(--ywa-button-size, 72px);
    height: var(--ywa-button-size, 72px);
    flex: 0 0 var(--ywa-button-size, 72px);
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--ywa-button-color, #25D366) !important;
    color: var(--ywa-icon-color, #fff) !important;
    text-decoration: none !important;
    border: 0 !important;
    outline: 0;
    pointer-events: auto;
    transition: transform .2s ease, filter .2s ease;
}

.ywa-button:hover,
.ywa-button:focus-visible {
    transform: translateY(-2px) scale(1.035);
    filter: brightness(.96);
}

.ywa-button svg {
    width: var(--ywa-icon-size, 40px);
    height: var(--ywa-icon-size, 40px);
    display: block;
}

.ywa-has-shadow .ywa-button {
    box-shadow: 0 9px 28px rgba(0,0,0,.22);
}

.ywa-bubble {
    position: relative;
    width: min(var(--ywa-bubble-width, 310px), calc(100vw - 120px));
    box-sizing: border-box;
    padding: 14px 42px 14px 16px;
    border-radius: 14px;
    background: var(--ywa-bubble-bg, #fff);
    color: var(--ywa-bubble-color, #222);
    font-size: 15px;
    line-height: 1.42;
    box-shadow: 0 10px 32px rgba(0,0,0,.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(7px) scale(.98);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
    pointer-events: auto;
}

.ywa-bubble.ywa-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.ywa-bubble::after {
    content: "";
    position: absolute;
    bottom: 18px;
    width: 12px;
    height: 12px;
    background: var(--ywa-bubble-bg, #fff);
    transform: rotate(45deg);
}

.ywa-position-right .ywa-bubble::after { right: -6px; }
.ywa-position-left .ywa-bubble::after { left: -6px; }

.ywa-bubble-close {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    opacity: .55;
    font: 22px/1 Arial, sans-serif;
    cursor: pointer;
}
.ywa-bubble-close:hover { opacity: 1; }

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

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

@media (max-width: 767px) {
    .ywa-hide-mobile { display: none !important; }
    .ywa-wrap {
        bottom: max(var(--ywa-bottom, 18px), env(safe-area-inset-bottom));
    }
    .ywa-position-right { right: min(var(--ywa-side, 18px), 24px); }
    .ywa-position-left { left: min(var(--ywa-side, 18px), 24px); }
    .ywa-bubble {
        font-size: 14px;
        width: min(var(--ywa-bubble-width, 310px), calc(100vw - 104px));
        padding: 12px 38px 12px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ywa-button,
    .ywa-bubble { transition: none !important; }
}
