/* --- General Styles --- */
#acb-contact-box-container {
    position: fixed;
    bottom: var(--acb-bottom-offset, 130px);
    z-index: 9999;
}

/* Positioning */
#acb-contact-box-container.position-right {
    right: 25px;
}
#acb-contact-box-container.position-left {
    left: 25px;
}

.acb-contact-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    display: none; /* Mặc định ẩn, JS sẽ xử lý */
}
#acb-contact-box-container.position-right .acb-contact-list {
    align-items: flex-end;
}
#acb-contact-box-container.position-left .acb-contact-list {
    align-items: flex-start;
}

/* Class 'active' sẽ được JS thêm vào để hiện các items */
#acb-contact-box-container.active .acb-contact-list {
    display: flex;
}

.acb-contact-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    margin-bottom: 10px;
    transition: all 0.3s ease;
	min-width: 170px;
}

.acb-contact-item:hover {
    transform: scale(1.05);
}

.acb-icon-wrapper {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
animation: pulse 2s infinite;	
}
.acb-icon-wrapper svg {
    width: 24px;
    height: 24px;
}

.acb-text {
    background-color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    white-space: nowrap;
	min-width : 110px;
}

#acb-contact-box-container.position-right .acb-text {
    margin-right: 10px;
}
#acb-contact-box-container.position-left .acb-text {
    margin-left: 10px;
    order: 1; /* Đảo vị trí text và icon */
}
#acb-contact-box-container.position-left .acb-icon-wrapper {
    order: 2;
}

/* --- Tùy chỉnh màu sắc --- */
.acb-phone .acb-icon-wrapper { background-color: #dd5449; }
.acb-wechat .acb-icon-wrapper { background-color: #07c160; }
.acb-contact-item .acb-icon-wrapper svg {
    fill: #fff;
}

/* Zalo & KakaoTalk dùng logo chính thức (đã có sẵn nền + hình bên trong),
   nên bỏ nền tròn tô màu của khung, chỉ giữ khung bo góc vuông ôm theo đúng logo */
.acb-zalo .acb-icon-wrapper,
.acb-kakaotalk .acb-icon-wrapper {
    background: transparent;
    border-radius: 22%;
    overflow: hidden;
    animation: none;
}
.acb-zalo .acb-icon-wrapper svg {
    width: 100%;
    height: 100%;
    display: block;
}
.acb-kakaotalk .acb-icon-wrapper img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* --- Popup mã QR (WeChat / KakaoTalk) --- */
.acb-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    align-items: center;
    justify-content: center;
}
.acb-popup-overlay.active {
    display: flex;
}
.acb-popup-box {
    background: #fff;
    border-radius: 12px;
    padding: 30px 25px;
    max-width: 300px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.acb-popup-box h3 {
    margin: 0 0 15px;
    font-size: 15px;
    color: #333;
}
.acb-popup-qr {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 8px;
    border: 1px solid #eee;
}
.acb-popup-close {
    position: absolute;
    top: 6px;
    right: 14px;
    font-size: 26px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}
.acb-popup-close:hover {
    color: #333;
}
.acb-popup-id-row {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.acb-popup-id-text {
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    color: #333;
}
.acb-popup-copy-btn {
    background: #fee500;
    color: #391b1b;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
}
.acb-popup-copy-btn:hover {
    opacity: 0.85;
}


/* --- Main Icon --- */
#acb-main-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: #e04332;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Thêm hiệu ứng xoay mượt */
}
#acb-contact-box-container.position-right #acb-main-icon {
    margin-left: auto;
}
#acb-main-icon svg {
    width: 28px;
    height: 28px;
    fill: #fff;
	animation: pulse 2s infinite;
    transition: transform 0.3s ease;
}
/* Xoay nút chính thay vì xoay icon bên trong */
#acb-contact-box-container.active #acb-main-icon {
    transform: rotate(135deg);
}


/* --- Hiệu ứng Pulse --- */
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(224, 67, 50, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(224, 67, 50, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(224, 67, 50, 0); }
}


/* --- Responsive cho Mobile (<= 768px) --- */
@media (max-width: 768px) {
    #acb-contact-box-container {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.08);
        padding: 5px 0;
    }
    #acb-main-icon {
        display: none;
    }
    .acb-contact-list {
        display: flex !important;
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
        margin-bottom: 0;
    }
    .acb-contact-item {
        width: var(--acb-mobile-item-width, 25%);
        margin-bottom: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
min-width : unset !important;
    }
    .acb-contact-item:hover {
        transform: none;
        background-color: #f5f5f5;
        border-radius: 8px;
    }
    .acb-icon-wrapper {
        width: 40px;
        height: 40px;
        margin: 0 0 5px 0;
        box-shadow: none;
    }
    .acb-text {
        padding: 0;
        background-color: transparent;
        box-shadow: none;
        font-size: 11px;
        font-weight: normal;
		min-width : unset !important;
		order: 2 !important;
    }
    #acb-contact-box-container.position-left .acb-text {
        margin-left: 0;
    }
	#acb-contact-box-container.position-left {
    left: 0 !important;
}
.acb-icon-wrapper {
    order: 1 !important;
	animation: pulse 2s infinite;
    transition: transform 0.3s ease;	
} 
}
