/* =============================================
   Contact All-in-One Button – Frontend CSS
   Compatible: WordPress 6.x
   ============================================= */

.cai-wrapper {
    position: fixed;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.cai-bottom-right {
    bottom: 24px;
    right: 24px;
}

/* Individual button */
.cai-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    border-radius: 99px;
    padding: 0 16px 0 6px;
    height: 52px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    color: #fff !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.cai-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    color: #fff !important;
    text-decoration: none !important;
}

.cai-btn:active {
    transform: scale(0.97);
}

/* Icon wrapper */
.cai-btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cai-btn-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

/* No label = circle only */
.cai-btn.cai-no-label {
    padding: 0;
    width: 52px;
    justify-content: center;
    border-radius: 50%;
}

.cai-btn.cai-no-label .cai-btn-icon {
    background: transparent;
}

/* Messenger gradient (applied via JS inline style too) */
.cai-btn-messenger {
    background: linear-gradient(135deg, #0084ff 0%, #a033ff 100%) !important;
}

/* Pulse animation — generic, works with any inline background color */
@keyframes cai-pulse-generic {
    0%   { box-shadow: 0 4px 16px rgba(0,0,0,.22), 0 0 0 0 rgba(255,255,255,0.4); }
    70%  { box-shadow: 0 4px 16px rgba(0,0,0,.22), 0 0 0 12px rgba(255,255,255,0); }
    100% { box-shadow: 0 4px 16px rgba(0,0,0,.22), 0 0 0 0 rgba(255,255,255,0); }
}

.cai-pulse { animation: cai-pulse-generic 2s infinite; }
.cai-pulse:nth-child(2) { animation-delay: 0.35s; }
.cai-pulse:nth-child(3) { animation-delay: 0.7s; }
.cai-pulse:nth-child(4) { animation-delay: 1.05s; }

/* Tooltip label fade in */
.cai-btn-label {
    opacity: 1;
    transition: opacity 0.2s;
}

/* Hide on mobile/desktop via JS class added to body */
body.cai-hide-mobile .cai-wrapper  { display: none; }
body.cai-hide-desktop .cai-wrapper { display: none; }

/* Responsive: smaller buttons on small screens */
@media (max-width: 480px) {
    .cai-btn {
        height: 46px;
        font-size: 13px;
        padding: 0 12px 0 5px;
    }
    .cai-btn-icon {
        width: 36px;
        height: 36px;
    }
    .cai-btn.no-label {
        width: 46px;
    }
    .cai-bottom-right {
        bottom: 16px;
        right: 14px;
    }
}
