/* WhatsApp Floating Chat - Frontend Styles */

/* Container positioning */
.wfc-floating-container {
    position: fixed;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 20px;
    transition: all 0.3s ease;
}

/* Position classes */
.wfc-floating-container.wfc-top.wfc-left {
    top: 20px;
    left: 20px;
}

.wfc-floating-container.wfc-top.wfc-right {
    top: 20px;
    right: 20px;
}

.wfc-floating-container.wfc-bottom.wfc-left {
    bottom: 20px;
    left: 20px;
}

.wfc-floating-container.wfc-bottom.wfc-right {
    bottom: 20px;
    right: 20px;
}

.wfc-floating-container.wfc-middle.wfc-left {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

.wfc-floating-container.wfc-middle.wfc-right {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

/* Icon link */
.wfc-icon-link {
    display: block;
    text-decoration: none;
    outline: none;
    position: relative;
}

/* Icon base */
.wfc-icon {
    display: block;
    filter: drop-shadow(0 4px 12px rgba(37, 211, 102, 0.4));
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    border-radius: 50%;
}

.wfc-icon-custom {
    border-radius: 50%;
    object-fit: contain;
}

/* Hover effects */
.wfc-icon:hover {
    transform: scale(1.15) !important;
    filter: drop-shadow(0 6px 20px rgba(37, 211, 102, 0.6));
}

/* ========== ANIMATIONS ========== */

/* 1. Pulse Animation */
.wfc-animate-pulse {
    animation: wfc-pulse 2s infinite;
}

@keyframes wfc-pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 4px 12px rgba(37, 211, 102, 0.4));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 4px 24px rgba(37, 211, 102, 0.7));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 4px 12px rgba(37, 211, 102, 0.4));
    }
}

/* 2. Bounce Animation */
.wfc-animate-bounce {
    animation: wfc-bounce 2s infinite;
}

@keyframes wfc-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* 3. Shake Animation */
.wfc-animate-shake {
    animation: wfc-shake 2s infinite;
}

@keyframes wfc-shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px);
    }
}

/* 4. Wobble Animation */
.wfc-animate-wobble {
    animation: wfc-wobble 2s infinite;
}

@keyframes wfc-wobble {
    0%, 100% {
        transform: translateX(0%) rotate(0deg);
    }
    15% {
        transform: translateX(-25%) rotate(-5deg);
    }
    30% {
        transform: translateX(20%) rotate(3deg);
    }
    45% {
        transform: translateX(-15%) rotate(-3deg);
    }
    60% {
        transform: translateX(10%) rotate(2deg);
    }
    75% {
        transform: translateX(-5%) rotate(-1deg);
    }
}

/* 5. Tada Animation */
.wfc-animate-tada {
    animation: wfc-tada 2s infinite;
}

@keyframes wfc-tada {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    10%, 20% {
        transform: scale(0.9) rotate(-3deg);
    }
    30%, 50%, 70%, 90% {
        transform: scale(1.1) rotate(3deg);
    }
    40%, 60%, 80% {
        transform: scale(1.1) rotate(-3deg);
    }
}

/* 6. Swing Animation */
.wfc-animate-swing {
    animation: wfc-swing 2s infinite;
    transform-origin: top center;
}

@keyframes wfc-swing {
    0%, 100% {
        transform: rotate(0deg);
    }
    20% {
        transform: rotate(15deg);
    }
    40% {
        transform: rotate(-10deg);
    }
    60% {
        transform: rotate(5deg);
    }
    80% {
        transform: rotate(-5deg);
    }
}

/* 7. Float Animation */
.wfc-animate-float {
    animation: wfc-float 3s ease-in-out infinite;
}

@keyframes wfc-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* ========== RIPPLE EFFECT ========== */
.wfc-ripple-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.3);
    animation: wfc-ripple 2s infinite;
    pointer-events: none;
    top: 0;
    left: 0;
}

.wfc-ripple-delay {
    animation-delay: 1s;
}

@keyframes wfc-ripple {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* ========== STATUS DOT ========== */
.wfc-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #4CAF50;
    border-radius: 50%;
    border: 2px solid #ffffff;
    animation: wfc-status-pulse 2s infinite;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

@keyframes wfc-status-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* ========== TOOLTIP ========== */
.wfc-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-top: 5px;
    position: relative;
}

.wfc-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: rgba(0, 0, 0, 0.8);
}

.wfc-floating-container:hover .wfc-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .wfc-floating-container {
        margin: 15px !important;
    }
    
    .wfc-tooltip {
        display: none;
    }
    
    .wfc-status-dot {
        width: 12px;
        height: 12px;
        bottom: 0px;
        right: 0px;
    }
}

@media (max-width: 480px) {
    .wfc-floating-container {
        margin: 10px !important;
    }
}