/* ============================================
   FLOATING CHAT WIDGET - WhatsApp & WeChat
   ============================================ */

.wpmesoch-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans,
        Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Chat Options (WhatsApp & WeChat buttons) */
.wpmesoch-chat-options {
    position: absolute;
    bottom: 80px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wpmesoch-chat-container.active .wpmesoch-chat-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Individual Chat Icons */
.sfiw-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.4s ease-out forwards;
    opacity: 0;
}

.wpmesoch-chat-container.active .sfiw-icons:nth-child(1) {
    animation-delay: 0.05s;
}

.wpmesoch-chat-container.active .sfiw-icons:nth-child(2) {
    animation-delay: 0.1s;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Chat Button Labels */
.label-sfiw {
    background: #424242;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.sfiw-icons:hover .label-sfiw {
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

/* Chat Buttons */
.wpmesoch-chat-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    background: linear-gradient(120deg, #424242 100%);
}

.wpmesoch-chat-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.wpmesoch-chat-toggle:active {
    transform: scale(0.95);
    background: linear-gradient(135deg, #0097b2 0%, #007a8f 100%);
}

.wpmesoch-chat-btn.whatsapp {
    background: linear-gradient(135deg, #0097b2 0%, #007a8f 100%) !important;
}

.wpmesoch-chat-btn.wechat {
    background: linear-gradient(135deg, #0097b2 0%, #007a8f 100%) !important;
}

.wpmesoch-chat-btn i,
.wpmesoch-chat-btn svg {
    font-size: 24px;
    color: #ffffff;
    transition: transform 0.3s ease;
}

.wpmesoch-chat-btn:hover i,
.wpmesoch-chat-btn:hover svg {
    transform: scale(1.2);
}

/* Main Toggle Button */
.wpmesoch-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #424242 0%, #212121 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wpmesoch-chat-toggle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s ease;
}

.wpmesoch-chat-toggle:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.wpmesoch-chat-toggle:hover {
    background: linear-gradient(135deg, #0097b2 0%, #007a8f 100%);
    box-shadow: 0 6px 30px rgba(0, 151, 178, 0.4);
    transform: scale(1.05);
}

.wpmesoch-chat-toggle i,
.wpmesoch-chat-toggle svg {
    font-size: 28px;
    color: #ffffff;
    transition: all 0.3s ease;
    z-index: 1;
}

.wpmesoch-chat-container.active .wpmesoch-chat-toggle i,
.wpmesoch-chat-container.active .wpmesoch-chat-toggle svg {
    transform: rotate(180deg);
}

.wpmesoch-chat-container.active .wpmesoch-chat-toggle {
    background: linear-gradient(135deg, #0097b2 0%, #007a8f 100%);
    box-shadow: 0 6px 30px rgba(0, 151, 178, 0.5);
}

/* Pulse Animation */
.wpmesoch-pulse {
    animation: wpmesoch-pulse 2s infinite;
}

@keyframes wpmesoch-pulse {
    0%,
    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow:
            0 4px 20px rgba(0, 0, 0, 0.3),
            0 0 0 10px rgba(0, 151, 178, 0.3),
            0 0 0 20px rgba(0, 151, 178, 0.1);
    }
}

.wpmesoch-chat-container.active .wpmesoch-pulse {
    animation: none;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .wpmesoch-chat-container {
        bottom: 15px;
        right: 15px;
    }

    .wpmesoch-chat-toggle {
        width: 55px;
        height: 55px;
    }

    .wpmesoch-chat-toggle i {
        font-size: 26px;
    }

    .wpmesoch-chat-btn {
        width: 45px;
        height: 45px;
    }

    .wpmesoch-chat-btn i {
        font-size: 22px;
    }

    .label-sfiw {
        font-size: 13px;
        padding: 6px 12px;
    }

    .wpmesoch-chat-options {
        bottom: 75px;
    }
}

@media screen and (max-width: 480px) {
    .wpmesoch-chat-container {
        bottom: 10px;
        right: 10px;
    }

    .wpmesoch-chat-toggle {
        width: 50px;
        height: 50px;
    }

    .wpmesoch-chat-toggle i {
        font-size: 24px;
    }
}

/* Accessibility */
.wpmesoch-chat-btn:focus,
.wpmesoch-chat-toggle:focus {
    outline: 3px solid rgba(0, 151, 178, 0.5);
    outline-offset: 2px;
}

/* Print - Hide chat widget */
@media print {
    .wpmesoch-chat-container {
        display: none !important;
    }
}
