/* =============================================================================
   WhatsApp Button widget
   Custom properties (--cc-wa-*) are set inline by the global floating button
   (see canasa_build_whatsapp_button_html()); the Elementor "WhatsApp Button"
   widget instead overrides these same properties via its own per-instance
   Elementor-generated selectors, which win on specificity either way.
   ============================================================================= */

.cc-wa-widget {
    position: fixed;
    bottom: var(--cc-wa-offset-bottom, 24px);
    z-index: var(--cc-wa-z, 9999);
    display: flex;
    align-items: center;
}

.cc-wa-widget.cc-wa-pos-right {
    right: var(--cc-wa-offset-side, 24px);
    left: auto;
    flex-direction: row-reverse;
}

.cc-wa-widget.cc-wa-pos-left {
    left: var(--cc-wa-offset-side, 24px);
    right: auto;
    flex-direction: row;
}

.cc-wa-btn {
    width: var(--cc-wa-size, 60px);
    height: var(--cc-wa-size, 60px);
    border-radius: 50%;
    background-color: var(--cc-wa-bg, #25D366);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: background-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.cc-wa-btn:hover {
    background-color: var(--cc-wa-bg-hover, #1ebe5a);
    transform: scale(1.05);
}

.cc-wa-icon svg {
    width: var(--cc-wa-icon-size, 32px);
    height: var(--cc-wa-icon-size, 32px);
    fill: var(--cc-wa-icon-color, #ffffff);
    display: block;
}

.cc-wa-label {
    background: #ffffff;
    color: #111827;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    margin: 0 12px;
}

/* Pulse animation — a soft expanding ring behind the button */
.cc-wa-btn.cc-wa-pulse {
    position: relative;
}

.cc-wa-btn.cc-wa-pulse::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: cc-wa-pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    z-index: -1;
}

@keyframes cc-wa-pulse-ring {
    0%   { transform: scale(1);   opacity: 0.6; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* Visibility */
@media (max-width: 767px) {
    .cc-wa-visibility-desktop { display: none; }
}

@media (min-width: 768px) {
    .cc-wa-visibility-mobile { display: none; }
}

/* Popup delay — hidden until assets/js/whatsapp-global.js adds
   .cc-wa-visible after the configured delay */
.cc-wa-widget.cc-wa-delayed {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.cc-wa-widget.cc-wa-delayed.cc-wa-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
