/**
 * Floating WhatsApp Button Styles
 * 悬浮 WhatsApp 按钮样式
 * 
 * Version: 1.4.0
 */

/* ============================================================================
   Floating WhatsApp Button
   ============================================================================ */

.floating-whatsapp {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: all 0.4s ease;
    cursor: pointer;
}

/* 当上拉按钮出现时，WhatsApp 按钮上移 */
.floating-whatsapp.shifted {
    bottom: 100px; /* 50px (上拉按钮高度) + 20px (间隔) + 30px (原始底部距离) */
}

.floating-whatsapp:hover {
    background: #20ba5a;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.floating-whatsapp svg {
    fill: #ffffff;
    width: 24px;
    height: 24px;
}

.floating-whatsapp svg path {
    fill: #ffffff;
}

/* 脉冲动画效果 */
.floating-whatsapp::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: #25D366;
    animation: pulse 2s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 768px) {
    .floating-whatsapp {
        right: 20px;
        bottom: 20px;
        width: 46px;
        height: 46px;
    }
    
    .floating-whatsapp.shifted {
        bottom: 86px; /* 46px + 20px + 20px */
    }
    
    .floating-whatsapp svg {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 480px) {
    .floating-whatsapp {
        right: 15px;
        bottom: 15px;
        width: 44px;
        height: 44px;
    }
    
    .floating-whatsapp.shifted {
        bottom: 79px; /* 44px + 20px + 15px */
    }
    
    .floating-whatsapp svg {
        width: 20px;
        height: 20px;
    }
}
