:root {
    --wa-size: 64px;
    --wa-bg: #25D366;
    --wa-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    --wa-accent: rgba(255, 255, 255, 0.12);
}

/* Floating container */
.wa-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: var(--wa-size);
    height: var(--wa-size);
    z-index: 9999;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--wa-bg), #20b858);
    box-shadow: var(--wa-shadow);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .16s cubic-bezier(.2, .9, .3, 1), box-shadow .16s;
}

.wa-float:active {
    transform: scale(.96);
}

.wa-float:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

/* subtle ring when focused (keyboard accessible) */
.wa-float:focus {
    outline: none;
    box-shadow: 0 0 0 6px var(--wa-accent), 0 14px 30px rgba(0, 0, 0, 0.22);
}

/* Circle inside to create white cut */
.wa-inner {
    width: calc(var(--wa-size) - 14px);
    height: calc(var(--wa-size) - 14px);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: transparent;
}

/* Tooltip */
.wa-tooltip {
    position: absolute;
    right: calc(var(--wa-size) + 28px);
    bottom: calc(var(--wa-size) / 2 - 12px);
    background: #111;
    color: #fff;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity .14s, transform .14s;
    pointer-events: none;
}

.wa-float:hover + .wa-tooltip,
.wa-float:focus + .wa-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Small pulse animation for attention */
@keyframes wa-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.35);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.wa-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: wa-pulse 2.6s infinite;
    pointer-events: none;
}

/* Make sure the button doesn't overlap critical mobile safe area (iPhone) */
@supports (padding: max(0px)) {
    .wa-float {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* Responsive: reduce size on small screens */
@media (max-width: 420px) {
    :root {
        --wa-size: 56px;
    }

    .wa-tooltip {
        right: calc(var(--wa-size) + 18px);
    }
}