#aiot-bubble-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* hoặc flex-start tùy vị trí */
}

/* Nút chính */
.aiot-btn-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    position: relative;
}

.aiot-btn-main .aiot-close-icon {
    display: none;
}
.aiot-btn-main.active .aiot-close-icon {
    display: block;
}
.aiot-btn-main.active i:not(.aiot-close-icon) {
    display: none;
}

/* Hiệu ứng Rung */
.aiot-effect-shake .aiot-btn-main {
    animation: aiot-shake 2s infinite;
}
@keyframes aiot-shake {
    0% { transform: rotate(0deg); }
    5% { transform: rotate(10deg); }
    10% { transform: rotate(-10deg); }
    15% { transform: rotate(5deg); }
    20% { transform: rotate(-5deg); }
    25% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

/* Hiệu ứng Glow */
.aiot-effect-glow .aiot-btn-main::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    opacity: 0.6;
    z-index: -1;
    animation: aiot-pulse 2s infinite;
}
@keyframes aiot-pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Contact List Popup */
.aiot-contact-list {
    display: none;
    margin-bottom: 15px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    width: 250px;
    overflow: hidden;
    animation: aiot-slide-up 0.3s ease;
}
.aiot-contact-list.show {
    display: block;
}
.aiot-contact-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.aiot-contact-list li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}
.aiot-contact-list li a:hover {
    background: #f9f9f9;
}
.aiot-item-icon {
    width: 30px;
    text-align: center;
    margin-right: 10px;
    font-size: 18px;
    color: #555;
}

/* Tooltip */
.aiot-tooltip {
    background: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-size: 14px;
    color: #333;
    position: relative;
    white-space: nowrap;
    animation: aiot-fade-in 0.5s;
}
.aiot-tooltip-close {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ccc;
    color: #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    line-height: 14px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
}

@keyframes aiot-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes aiot-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.aiot-item-icon {
    width: 30px;
    height: 30px; /* Cố định chiều cao để căn giữa */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 18px;
    color: #555;
}

/* Style cho ảnh icon tùy chỉnh */
.aiot-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Đảm bảo ảnh không bị méo */
    border-radius: 4px;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .aiot-btn-main { width: 50px; height: 50px; font-size: 24px; }
    .aiot-contact-list { width: 220px; }
}