/* Container chính của nút Kaola */
#kaola-contact-button-wrapper {
    position: fixed;
    z-index: 9999;
    bottom: 30px; /* Mặc định - sẽ bị JS ghi đè theo cài đặt admin */
}

/* Nút bấm chính (Hình tròn) */
#kaola-contact-main-button {
    background-color: #0073aa; /* Mặc định */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    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;
    position: relative;
    overflow: hidden;
    /* Hiệu ứng nhịp tim (Pulse) */
    animation: kaola-cb-pulse 2s infinite ease-in-out;
}

#kaola-contact-main-button:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    animation: none; /* Tắt pulse khi hover */
}

/* Căn chỉnh biểu tượng Dashicons bên trong */
#kaola-contact-main-button .kaola-cb-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

#kaola-contact-main-button .kaola-cb-icon-wrapper .dashicons {
    font-size: 18px;
    line-height: 1;
    width: auto;
    height: auto;
    vertical-align: middle;
    color: inherit !important; /* Quan trọng: Nhận màu từ JS Color Picker */
}

/* Container chứa các liên kết mạng xã hội (Zalo, Messenger...) */
#kaola-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);
    width: 200px;
    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;
}

/* Hiển thị menu khi hover vào wrapper */
#kaola-contact-button-wrapper:hover #kaola-cb-details-container {
    max-height: 350px;
    opacity: 1;
    visibility: visible;
}

#kaola-cb-details-container .kaola-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;
}

#kaola-cb-details-container .kaola-cb-detail-item:hover {
    background-color: #f0f0f0;
    color: #0073aa; /* Có thể đổi thành màu thương hiệu Kaola */
}

/* Icon nhỏ cho danh sách chi tiết */
#kaola-cb-details-container .kaola-cb-icon-small {
    width: 16px;
    height: 16px;
    object-fit: contain;
    margin-right: 8px;
}

/* Logic vị trí Trái/Phải */
#kaola-contact-button-wrapper.position-left {
    left: 30px;
    right: auto;
}

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

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

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

/* Định nghĩa hiệu ứng Pulse cho Kaola Group */
@keyframes kaola-cb-pulse {
    0% { transform: scale(1); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); }
    50% { transform: scale(1.05); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); }
    100% { transform: scale(1); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); }
}