/**
 * Frontend CSS for WhatsApp Chat Plugin
 * @package WhatsAppChat
 * @since 3.0.0
 */

/* Base Button Styles */
.cfbxd-whatsapp-button {
    position: fixed;
    bottom: 20px;
    z-index: 999999;
}

.cfbxd-position-left {
    left: 20px;
}

.cfbxd-position-right {
    right: 20px;
}

.cfbxd-wa-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cfbxd-wa-link:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

/* Free Version Specific */
.cfbxd-free-version .cfbxd-wa-link {
    width: 55px;
    height: 55px;
    background: #25D366;
    border-radius: 50%;
}

.cfbxd-free-version .cfbxd-wa-link i {
    font-size: 28px;
    color: white;
}

/* Premium Version Sizes */
.cfbxd-size-small .cfbxd-wa-link {
    padding: 8px 14px;
    font-size: 13px;
}

.cfbxd-size-small .cfbxd-wa-link i {
    font-size: 16px;
}

.cfbxd-size-medium .cfbxd-wa-link {
    padding: 12px 22px;
    font-size: 15px;
}

.cfbxd-size-medium .cfbxd-wa-link i {
    font-size: 20px;
}

.cfbxd-size-large .cfbxd-wa-link {
    padding: 15px 28px;
    font-size: 17px;
}

.cfbxd-size-large .cfbxd-wa-link i {
    font-size: 24px;
}

/* Premium Version Styles */
.cfbxd-style-round .cfbxd-wa-link {
    border-radius: 8px;
}

.cfbxd-style-square .cfbxd-wa-link {
    border-radius: 0;
}

.cfbxd-style-pill .cfbxd-wa-link {
    border-radius: 50px;
}

.cfbxd-style-circle .cfbxd-wa-link {
    border-radius: 50%;
    aspect-ratio: 1/1;
    padding: 15px;
}

.cfbxd-style-circle .cfbxd-wa-text {
    display: none;
}

/* Text Display Options */
.cfbxd-text-none .cfbxd-wa-text {
    display: none;
}

.cfbxd-text-hover .cfbxd-wa-text {
    display: none;
}

.cfbxd-text-hover:hover .cfbxd-wa-text {
    display: inline;
}

/* Animations */
@keyframes cfbxd-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

@keyframes cfbxd-shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

@keyframes cfbxd-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.cfbxd-animate-pulse .cfbxd-wa-link {
    animation: cfbxd-pulse 1.5s infinite;
}

.cfbxd-animate-shake .cfbxd-wa-link {
    animation: cfbxd-shake 0.5s infinite;
}

.cfbxd-animate-bounce .cfbxd-wa-link {
    animation: cfbxd-bounce 1s infinite;
}

/* Tooltip Styles */
.cfbxd-tooltip {
    position: absolute;
    bottom: 100%;
    margin-bottom: 10px;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cfbxd-tooltip-right {
    right: 0;
}

.cfbxd-tooltip-left {
    left: 0;
}

.cfbxd-whatsapp-button:hover .cfbxd-tooltip {
    visibility: visible;
    opacity: 1;
}

.cfbxd-tooltip-text {
    background: #333;
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
}

.cfbxd-tooltip-text:after {
    content: "";
    position: absolute;
    top: 100%;
    border-width: 5px;
    border-style: solid;
}

.cfbxd-tooltip-right .cfbxd-tooltip-text:after {
    right: 10px;
    border-color: #333 transparent transparent transparent;
}

.cfbxd-tooltip-left .cfbxd-tooltip-text:after {
    left: 10px;
    border-color: #333 transparent transparent transparent;
}

/* Responsive */
@media (max-width: 768px) {
    .cfbxd-whatsapp-button {
        bottom: 15px;
    }
    
    .cfbxd-position-left {
        left: 15px;
    }
    
    .cfbxd-position-right {
        right: 15px;
    }
    
    .cfbxd-free-version .cfbxd-wa-link {
        width: 50px;
        height: 50px;
    }
    
    .cfbxd-free-version .cfbxd-wa-link i {
        font-size: 24px;
    }
}