.wa__widget_container {
    position: fixed;
    z-index: 9999;
    font-family: Cairo, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wa__btn_popup {
    position: fixed;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
}

/* Default positioning for LTR (English) - left side */
.wa__btn_popup {
    left: 30px;
    bottom: 30px;
}

/* RTL positioning (Arabic) - right side */
[dir="rtl"] .wa__btn_popup {
    left: unset;
    right: 30px;
}

.wa__btn_popup.wa__active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(45, 183, 66, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(45, 183, 66, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(45, 183, 66, 0);
    }
}

.wa__btn_popup_icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #2db742;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893A11.821 11.821 0 0020.893 3.488'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 32px;
}

.wa__btn_popup:hover .wa__btn_popup_icon {
    transform: scale(1.1);
}

.wa__btn_popup_txt {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #2db742;
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: block !important;
    animation: fadeIn 0.3s ease;
    z-index: 10001;
}
/* Hide tooltip when clicked */
.wa__btn_popup_txt.hidden {
    display: none !important;
}
/* Tooltip positioning for LTR (English) - tooltip appears on the right */
.wa__btn_popup_txt {
    left: 100%;
    margin-left: 15px;
}

/* Tooltip positioning for RTL (Arabic) - tooltip appears on the left */
[dir="rtl"] .wa__btn_popup_txt {
    left: unset;
    right: 100%;
    margin-left: 0;
    margin-right: 15px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

.wa__popup_chat_box {
    position: fixed;
    width: 320px;
    max-height: 400px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    z-index: 9999;
}

/* Chat box positioning for LTR (English) - left side */
.wa__popup_chat_box {
    left: 30px;
    bottom: 102px;
}

/* Chat box positioning for RTL (Arabic) - right side */
[dir="rtl"] .wa__popup_chat_box {
    left: unset;
    right: 30px;
}

.wa__popup_chat_box.wa__active {
    transform: scale(1);
    opacity: 1;
}

.wa__popup_heading {
    background: #2db742;
    padding: 20px;
    color: white;
    position: relative;
}

.wa__popup_title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.wa__popup_intro {
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.4;
}

.wa__popup_content {
    padding: 15px 0;
    max-height: 280px;
    overflow-y: auto;
}

.wa__popup_notice {
    padding: 0 20px 15px;
    font-size: 11px;
    color: #666;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 10px;
}

.wa__popup_content_item {
    padding: 10px 20px;
    transition: background 0.2s ease;
}

.wa__popup_content_item:hover {
    background: #f8f9fa;
}

.wa__stt {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.wa__popup_avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    flex-shrink: 0;
}

/* RTL avatar margin */
[dir="rtl"] .wa__popup_avatar {
    margin-right: 0;
    margin-left: 12px;
}

.wa__stt_online::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    background: #4caf50;
    border-radius: 50%;
    border: 2px solid white;
}

/* RTL online indicator */
[dir="rtl"] .wa__stt_online::after {
    right: unset;
    left: 4px;
}

.wa__member_name {
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 14px;
}

.wa__member_duty {
    font-size: 11px;
    color: #666;
}

/* Close button */
.wa__close_btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

/* RTL close button */
[dir="rtl"] .wa__close_btn {
    right: unset;
    left: 20px;
}

.wa__close_btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .wa__popup_chat_box {
        width: 280px;
        left: 20px;
        bottom: 90px;
    }

    [dir="rtl"] .wa__popup_chat_box {
        left: unset;
        right: 20px;
    }

    .wa__btn_popup {
        left: 20px;
        bottom: 20px;
    }

    [dir="rtl"] .wa__btn_popup {
        left: unset;
        right: 20px;
    }

    .wa__btn_popup_txt {
        font-size: 12px;
        padding: 8px 12px;
        margin-left: 10px;
    }

    [dir="rtl"] .wa__btn_popup_txt {
        margin-left: 0;
        margin-right: 10px;
    }
}

/* Additional mobile adjustments for small screens */
@media (max-width: 380px) {
    .wa__popup_chat_box {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
    }

    [dir="rtl"] .wa__popup_chat_box {
        left: 20px;
        right: 20px;
    }
}
