.ac-buttons-container {
    position: fixed;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.ac-buttons-container.ac-visible {
    opacity: 1;
    visibility: visible;
}

.ac-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3b30;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

.ac-greeting-bubble {
    position: absolute;
    right: 75px;
    background: #fff;
    color: #333;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 5;
    animation: ac-pop-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: opacity 0.3s ease;
}

/* Hide greeting bubble on hover to reveal tooltip */
.ac-button:hover .ac-greeting-bubble {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

/* When both greeting and label coexist, delay the tooltip reveal for a clean swap */
.ac-button.ac-has-greeting .ac-button-label {
    transition-delay: 0.1s;
}

.ac-position-left .ac-greeting-bubble {
    right: auto;
    left: 75px;
}

.ac-greeting-bubble::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
}

.ac-position-right .ac-greeting-bubble::after {
    left: 100%;
    border-color: transparent transparent transparent #fff;
}

.ac-position-left .ac-greeting-bubble::after {
    right: 100%;
    border-color: transparent #fff transparent transparent;
}

@keyframes ac-pop-in {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* Horizontal position classes — offset is set via inline style */
.ac-buttons-container.ac-position-right {
    /* horizontal offset handled by inline right: Xpx */
}

.ac-buttons-container.ac-position-left {
    /* horizontal offset handled by inline left: Xpx */
}

/* Vertical position classes */
.ac-buttons-container.ac-vposition-bottom {
    flex-direction: column-reverse;
}

.ac-buttons-container.ac-vposition-top {
    flex-direction: column;
}

.ac-buttons-container.ac-vposition-middle {
    flex-direction: column;
}

.ac-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    pointer-events: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    outline: none;
}

.ac-button svg {
    fill: #fff;
}

.ac-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* Tooltip Labels */
.ac-button-label {
    position: absolute;
    right: 75px; /* Tooltip spacing for right position */
    background: #333;
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(10px) translateY(0); /* Separate transforms to block interference */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.ac-position-left .ac-button-label {
    right: auto;
    left: 75px;
    transform: translateX(-10px) translateY(0);
}

.ac-button:hover .ac-button-label {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

.ac-button-label::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
}

.ac-position-right .ac-button-label::after {
    left: 100%;
    border-color: transparent transparent transparent #333;
}

.ac-position-left .ac-button-label::after {
    right: 100%;
    border-color: transparent #333 transparent transparent;
}

/* Visibility */
@media screen and (max-width: 768px) {
    .ac-hide-mobile {
        display: none !important;
    }
}

@media screen and (min-width: 769px) {
    .ac-hide-desktop {
        display: none !important;
    }
}

/* Animations */
.ac-animation-bounce .ac-button {
    animation: ac-bounce 2s infinite;
}

.ac-animation-pulse .ac-button {
    animation: ac-pulse 2s infinite;
}

.ac-animation-shake .ac-button {
    animation: ac-shake 3s infinite;
}

.ac-animation-spin .ac-button {
    animation: ac-spin 4s linear infinite;
}

.ac-animation-fade .ac-button {
    animation: ac-fade-in-up 1s ease-out;
}

@keyframes ac-bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-7px);
    }
}

@keyframes ac-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.4);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

@keyframes ac-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ac-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes ac-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Override hover during animation */
.ac-animation-bounce .ac-button:hover,
.ac-animation-pulse .ac-button:hover,
.ac-animation-shake .ac-button:hover,
.ac-animation-spin .ac-button:hover {
    animation-play-state: paused;
    transform: scale(1.1);
}