/* Floating WhatsApp button, bottom-right on every page. */

.dwb-button {
    position: fixed;
    right: calc(20px + env(safe-area-inset-right, 0px));
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 99990;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.dwb-button svg {
    box-sizing: content-box;
    display: block;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    padding: 15px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, background-color 0.2s ease;
    animation: dwb-pulse 2.4s ease-out 1.5s 3;
}

.dwb-button:hover svg,
.dwb-button:focus-visible svg {
    background: #1ebe5b;
    transform: scale(1.06);
}

.dwb-button:focus-visible {
    outline: none;
}

.dwb-button:focus-visible svg {
    outline: 3px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px #128c4a;
}

.dwb-button__label {
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    color: #1f2d3d;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.dwb-button:hover .dwb-button__label,
.dwb-button:focus-visible .dwb-button__label {
    opacity: 1;
    transform: none;
}

@keyframes dwb-pulse {
    0% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(37, 211, 102, 0.55);
    }

    70% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 0 16px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@media (max-width: 767px) {
    .dwb-button {
        right: calc(16px + env(safe-area-inset-right, 0px));
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .dwb-button__label {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dwb-button svg,
    .dwb-button__label {
        animation: none;
        transition: none;
    }
}

@media print {
    .dwb-button {
        display: none;
    }
}
