#webio-contact-button-wrapper {
    position: fixed;
    z-index: 9999;
    bottom: 30px; /* Mặc định */
}

#webio-contact-main-button {
    background-color: #0073aa; /* Mặc định - sẽ bị JS ghi đè */
    /* Màu icon sẽ được JS gán động vào thuộc tính 'color' của nút này */
    width: 50px; /* Kích thước cố định cho nút tròn */
    height: 50px; /* Kích thước cố định cho nút tròn */
    border-radius: 50%; /* Làm cho nút tròn */
    display: flex;
    align-items: center;
    justify-content: center; /* Căn giữa biểu tượng */
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* THÊM transition cho transform và box-shadow */
    position: relative;
    overflow: hidden;

    /* THÊM HIỆU ỨNG ĐỘNG PULSE */
    animation: webio-cb-pulse 2s infinite ease-in-out;
}

#webio-contact-main-button:hover {
    transform: scale(1.08); /* Làm lớn hơn một chút khi hover */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4); /* Bóng mạnh hơn khi hover */
    animation: none; /* Tắt animation pulse khi hover để hiệu ứng hover rõ ràng hơn */
}

/* Biểu tượng Dashicon trong nút điện thoại chính */
#webio-contact-main-button .webio-cb-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; /* Kích thước vòng tròn */
    height: 32px; /* Kích thước vòng tròn */
    border-radius: 50%;
    /* Bạn có thể thêm background-color cho vòng tròn nếu muốn */
    /* background-color: rgba(255, 255, 255, 0.8); */
}

#webio-contact-main-button .webio-cb-icon-wrapper .dashicons {
    font-size: 18px; /* Kích thước cho Dashicon */
    line-height: 1; /* Đảm bảo căn chỉnh tốt */
    width: auto; /* Cho phép icon tự điều chỉnh kích thước */
    height: auto;
    vertical-align: middle; /* Căn chỉnh dọc */
    text-decoration: none; /* Đảm bảo không có gạch chân nếu là link */
    color: inherit !important; /* DÒNG MỚI QUAN TRỌNG ĐỂ BUỘC KẾ THỪA MÀU TỪ JS */
}

/* Nhãn hiển thị khi hover (sẽ luôn ẩn) */
#webio-contact-main-button .webio-cb-label-on-hover {
    position: absolute;
    right: -100%; /* Đảm bảo luôn ẩn ở bên phải */
    padding: 5px 10px;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.7); /* Nền cho nhãn */
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0; /* Đảm bảo luôn ẩn */
    visibility: hidden; /* Đảm bảo luôn ẩn */
    transition: none; /* Bỏ mọi transition để không bao giờ hiện */
}


/* Container chi tiết */
#webio-cb-details-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
    position: absolute;
    bottom: calc(100% + 15px); /* Đặt lên trên nút chính */
    width: 200px; /* Hoặc auto */
    max-height: 0; /* Ẩn mặc định */
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, visibility 0.3s ease-out;
}

#webio-contact-button-wrapper:hover #webio-cb-details-container {
    max-height: 300px; /* Đủ lớn để chứa các mục */
    opacity: 1;
    visibility: visible;
}

#webio-cb-details-container .webio-cb-detail-item {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

#webio-cb-details-container .webio-cb-detail-item:hover {
    background-color: #f0f0f0;
    color: #0073aa;
}

/* Biểu tượng nhỏ trong danh sách chi tiết (vẫn là PNG) */
#webio-cb-details-container .webio-cb-icon-small {
    width: 16px; /* Kích thước nhỏ hơn cho icon trong danh sách chi tiết */
    height: 16px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
}

/* Định vị nút theo cài đặt admin */
#webio-contact-button-wrapper.position-left {
    left: 30px;
    right: auto;
}

#webio-contact-button-wrapper.position-right {
    right: 30px;
    left: auto;
}

/* Điều chỉnh vị trí của hộp chi tiết khi nút nằm bên trái */
#webio-contact-button-wrapper.position-left #webio-cb-details-container {
    left: 0;
    right: auto;
}

#webio-contact-button-wrapper.position-right #webio-cb-details-container {
    right: 0;
    left: auto;
}

/* ĐỊNH NGHĨA KEYFRAMES CHO HIỆU ỨNG PULSE */
@keyframes webio-cb-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.05); /* Làm lớn hơn 5% */
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Bóng mạnh hơn */
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
}