/**
 * ExamBlaze Floating WhatsApp Button
 * Fixed position button with pulse animation
 * 
 * @package ExamBlaze
 * @version 1.0
 */

/* ========================================
   WHATSAPP FLOAT BUTTON
   ======================================== */

.whatsapp-float {
    position: fixed;
    bottom: 25px !important;
    right: 25px !important;
    left: auto !important;
    width: 60px;
    height: 60px;
    background: #25D366;
    /* Official WhatsApp Green */
    color: var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    z-index: 9999;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.7);
}

.whatsapp-float:active {
    transform: scale(0.95);
}

.whatsapp-float i {
    font-size: 32px;
}

/* ========================================
   PULSE ANIMATION
   ======================================== */

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5), 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5), 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Alternative: Bounce Animation (Uncomment to use) */
/*
@keyframes whatsappBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.whatsapp-float {
    animation: whatsappBounce 2s infinite;
}
*/

/* ========================================
   TOOLTIP (Optional)
   ======================================== */

.whatsapp-float::before {
    content: "Chat with us!";
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--deep-navy);
    color: var(--text-white);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-family: var(--font-body);
    white-space: nowrap;
    margin-right: var(--space-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-base) var(--ease-in-out);
}

.whatsapp-float::after {
    content: "";
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: var(--deep-navy);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-base) var(--ease-in-out);
}

.whatsapp-float:hover::before,
.whatsapp-float:hover::after {
    opacity: 1;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .whatsapp-float {
        bottom: 25px !important;
        right: 25px !important;
        left: auto !important;
        width: 55px;
        height: 55px;
    }

    .whatsapp-float i {
        font-size: 28px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px !important;
        right: 20px !important;
        left: auto !important;
        width: 50px;
        height: 50px;
    }

    .whatsapp-float i {
        font-size: 26px;
    }

    /* Hide tooltip on mobile */
    .whatsapp-float::before,
    .whatsapp-float::after {
        display: none;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 15px !important;
        right: 15px !important;
        left: auto !important;
        width: 45px;
        height: 45px;
    }

    .whatsapp-float i {
        font-size: 24px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.whatsapp-float:focus {
    outline: 3px solid var(--primary-blue);
    outline-offset: 3px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-float {
        animation: none;
    }
}