/* Chat Widget Styles */
.chat-widget-wrapper {
    position: fixed;
    bottom: 35px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-widget-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    /* Background color is set dynamically via inline style */
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.chat-widget-btn:hover {
    transform: scale(1.1);
}

.chat-widget-btn .fa-times {
    display: none;
    position: absolute;
}

.chat-widget-wrapper.active .chat-widget-btn .fa-comment-dots {
    display: none;
}

.chat-widget-wrapper.active .chat-widget-btn .fa-times {
    display: block;
    animation: rotateIn 0.3s ease;
}

.chat-widget-platforms {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.chat-widget-wrapper.active .chat-widget-platforms {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-platform-item {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.chat-platform-item:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.chat-platform-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    padding: 2px;
}

.platform-tooltip {
    position: absolute;
    right: 55px;
    background: #2d3436;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.platform-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px 0 5px 5px;
    border-style: solid;
    border-color: transparent transparent transparent #2d3436;
}

.chat-platform-item:hover .platform-tooltip {
    opacity: 1;
    visibility: visible;
    right: 60px;
}

@keyframes rotateIn {
    from {
        transform: rotate(-90deg);
        opacity: 0;
    }

    to {
        transform: rotate(0);
        opacity: 1;
    }
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
    .chat-widget-wrapper {
        bottom: 90px;
        right: 20px;
    }

    .chat-widget-btn {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .chat-platform-item {
        width: 38px;
        height: 38px;
    }

    .scrollToTop {
        bottom: 90px !important;
        right: 80px !important;
    }
}

/* Override scrollToTop position to avoid overlap with chat widget (Desktop) */
@media (min-width: 577px) {
    .scrollToTop {
        right: 100px !important;
        bottom: 35px !important;
        z-index: 9990;
    }
}