/* Chat widget integrated with GREEN site style */
#siteChatWidget {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 60;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#siteChatWidget .cw-toggle {
    position: relative;
    width: 62px;
    height: 62px;
    border: none;
    border-radius: 9999px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #58A977 0%, #92CC9E 100%);
    box-shadow: 0 14px 30px rgba(88, 169, 119, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#siteChatWidget .cw-toggle:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 20px 36px rgba(88, 169, 119, 0.5);
}

#siteChatWidget .cw-toggle::after {
    content: '';
    position: absolute;
    inset: -45%;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 65%);
    transform: translateX(-135%);
    animation: chatToggleShimmer 2.7s linear infinite;
    pointer-events: none;
}

#siteChatWidget .cw-toggle-icon {
    position: relative;
    z-index: 1;
    width: 26px;
    height: 26px;
}

#siteChatWidget .cw-toggle-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#siteChatWidget .cw-tip {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%);
    background: #1E293B;
    color: #e2e8f0;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    border-radius: 10px;
    padding: 10px 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#siteChatWidget:hover .cw-tip {
    opacity: 1;
}

#siteChatWidget .cw-popup {
    position: absolute;
    right: 0;
    bottom: 78px;
    width: 340px;
    max-width: calc(100vw - 20px);
    padding: 18px;
    border-radius: 22px;
    background: #f3f5f8;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);
    transition: all 0.22s ease;
}

#siteChatWidget.open .cw-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

#siteChatWidget .cw-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 9999px;
    background: #e5e7eb;
    color: #475569;
    cursor: pointer;
}

#siteChatWidget .cw-close:hover {
    background: #dbe0e8;
}

#siteChatWidget .cw-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-right: 38px;
    padding-bottom: 12px;
    border-bottom: 1px solid #d6dbe4;
}

#siteChatWidget .cw-head-ico {
    width: 45px;
    height: 45px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #58A977 0%, #92CC9E 100%);
    box-shadow: 0 6px 16px rgba(88, 169, 119, 0.3);
    flex-shrink: 0;
}

#siteChatWidget .cw-head-ico i {
    font-size: 20px;
}

#siteChatWidget .cw-header h4 {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
    color: #111827;
    font-weight: 700;
}

#siteChatWidget .cw-header p {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.3;
    color: #6b7280;
}

#siteChatWidget .cw-list {
    display: grid;
    gap: 10px;
}

#siteChatWidget .cw-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    border-radius: 14px;
    padding: 12px;
    background: #eceff3;
    border: 1px solid #e4e9f0;
    transition: all 0.2s ease;
}

#siteChatWidget .cw-link:hover {
    transform: translateX(2px);
    border-color: rgba(88, 169, 119, 0.45);
    box-shadow: 0 8px 18px rgba(88, 169, 119, 0.12);
}

#siteChatWidget .cw-link-ico {
    width: 38px;
    height: 38px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    flex-shrink: 0;
}

#siteChatWidget .cw-link-ico img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

#siteChatWidget .cw-link-ico.whatsapp {
    background: #25D366;
}

#siteChatWidget .cw-link-ico.telegram {
    background: #0088cc;
}

#siteChatWidget .cw-link-ico.email {
    background: #6b7280;
}

#siteChatWidget .cw-link-ico.phone {
    background: #10b981;
}

#siteChatWidget .cw-link-text strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 700;
}

#siteChatWidget .cw-link-text span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.3;
}

@keyframes chatToggleShimmer {
    100% {
        transform: translateX(135%);
    }
}

@media (max-width: 768px) {
    #siteChatWidget {
        right: 12px;
        bottom: 12px;
    }

    #siteChatWidget .cw-toggle {
        width: 56px;
        height: 56px;
    }

    #siteChatWidget .cw-popup {
        bottom: 68px;
        width: min(330px, calc(100vw - 14px));
        padding: 14px;
    }

    #siteChatWidget .cw-tip {
        display: none;
    }

    #siteChatWidget .cw-header h4 {
        font-size: 15px;
    }

    #siteChatWidget .cw-header p {
        font-size: 12px;
    }

    #siteChatWidget .cw-link-text strong {
        font-size: 14px;
    }

    #siteChatWidget .cw-link-text span {
        font-size: 12px;
    }
}
