/*
 * CSS cho Plugin Multi Social Float Button
 * Đã tinh chỉnh để tăng độ ưu tiên (specificity) nhằm tránh xung đột với các theme mạnh như WoodMart.
 */

/* Container chính của nút nổi */
#multi-social-float {
    position: fixed !important; /* Đảm bảo vị trí cố định tuyệt đối */
    bottom: 0px; 
    z-index: 99999 !important; /* Tăng Z-index lên cao hơn */
    display: flex;
    flex-direction: column;
    align-items: center;
    
    transition: all 0.3s ease;
}

/* Kiểu dáng chung cho mỗi nút */
.btn-frame {
    /* Vị trí absolute và bottom offset được set dynamically qua inline style trong PHP */
    position: absolute; 
    
    width: var(--button-size);
    height: var(--button-size);
    text-align: center;
    line-height: var(--button-size);
    border-radius: 50%;
    
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.btn-frame:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
}

/* Đảm bảo hình ảnh nằm trong trung tâm và tròn */
.btn-frame i {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.btn-frame i img {
    width: var(--icon-size);
    height: var(--icon-size);
    object-fit: cover;
    border-radius: 50%;
    /* Tính margin để căn giữa */
    margin: calc((var(--button-size) - var(--icon-size)) / 2); 
}

/* Hiệu ứng nhấp nháy */
/* Vòng tròn bên ngoài (Pulse) */
.kenit-alo-circle {
    width: var(--button-size);
    height: var(--button-size);
    top: 0;
    left: 0;
    position: absolute;
    background-color: transparent !important; /* Cố định màu nền */
    border-radius: 100%;
    border: 2px solid var(--btn-color) !important; /* Cố định viền */
    opacity: 0.1;
    z-index: 1;
    animation-delay: 0s;
    pointer-events: none; /* Không cho phép click vào vòng tròn hiệu ứng */
}

/* Vòng tròn bên trong (ZoomIn) - Lớn hơn nút 10px (5px mỗi bên) */
.kenit-alo-circle-fill {
    width: calc(var(--button-size) + 10px);
    height: calc(var(--button-size) + 10px);
    top: -5px;
    left: -5px;
    position: absolute;
    background-color: transparent !important; /* Cố định màu nền */
    border-radius: 100%;
    border: 2px solid var(--btn-color) !important; /* Cố định viền */
    opacity: 0.7;
    z-index: 1;
    animation-delay: 0.5s;
    pointer-events: none; /* Không cho phép click vào vòng tròn hiệu ứng */
}

/* Overrides cho thư viện animate.css */
/* Đảm bảo các thuộc tính animation không bị WoodMart ghi đè */
.animated.infinite {
    animation-duration: 2s !important;
    animation-timing-function: linear !important; 
    animation-iteration-count: infinite !important;
}

/* Hiệu ứng nhấp nháy/chớp chớp (Blinking/Flashing) */
@keyframes blink-flash {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Áp dụng hiệu ứng chớp chớp cho nút */
.btn-frame.blink-effect {
    animation: blink-flash 1.5s ease-in-out infinite !important;
}

/* Hiệu ứng chớp chớp mạnh hơn cho icon */
.btn-frame.blink-effect i {
    animation: blink-flash 1.5s ease-in-out infinite !important;
}

/* Responsive: Giữ ở vị trí cố định trên mobile */
@media (max-width: 768px) {
    /* Đảm bảo z-index vẫn cao trên mobile */
    #multi-social-float {
        z-index: 99999 !important;
    }
}
