/* Floating Buttons — Component CSS */
#sh-floating-buttons {
    position: fixed; bottom: 16px; right: 16px;
    z-index: var(--z-floating-btns, 9991);
    display: flex; flex-direction: column; gap: 10px; align-items: center;
    transition: bottom 0.3s ease;
}
#back-to-top {
    display: none; opacity: 0; width: 48px; height: 48px;
    border-radius: 50%; background: var(--sh-bg-card, #fff);
    box-shadow: 0 2px 12px var(--sh-shadow, rgba(0,0,0,0.12));
    align-items: center; justify-content: center;
    transition: opacity 0.3s, transform 0.3s; position: relative;
    cursor: pointer;
}
#back-to-top:hover { transform: translateY(-3px); box-shadow: 0 4px 20px var(--sh-shadow, rgba(0,0,0,0.15)); }
#back-to-top .sh-scroll-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
#back-to-top .sh-scroll-track { fill: none; stroke: var(--sh-border, #e5e7eb); stroke-width: 2; }
#back-to-top .sh-scroll-progress { fill: none; stroke: var(--pi-primary, #007d3d); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 100, 100; stroke-dashoffset: 100; transition: none; }
#sh-toggle {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--pi-primary, #007d3d), #059669);
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 16px rgba(0,125,61,0.4);
    transition: all 0.3s; position: relative;
}
#sh-toggle:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(0,125,61,0.45); }
#sh-ic-chat, #sh-ic-x { transition: all 0.3s; }
#sh-ic-x { position: absolute; opacity: 0; transform: rotate(-90deg) scale(0.5); }
#sh-badge { position: absolute; top: -1px; right: -1px; width: 10px; height: 10px; background: var(--color-danger, #ef4444); border-radius: 50%; border: 2px solid var(--sh-bg-card, #fff); }
.sh-phone-float {
    width: 48px; height: 48px; border-radius: 50%; background: var(--color-danger, #ff0000);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 12px rgba(255,0,0,0.3);
    transition: transform 0.2s; position: relative; overflow: hidden;
}
.sh-phone-float:hover { transform: scale(1.1); }
.sh-zalo-btn {
    display: flex; align-items: center; justify-content: center;
    width: 3rem; height: 3rem; border-radius: 50%;
    background: var(--pi-bg-card, #ffffff);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    overflow: hidden; transition: transform 0.3s; flex-shrink: 0;
}
.sh-zalo-btn:hover { transform: scale(1.1); }
.sh-zalo-btn__img { width: 100%; height: 100%; object-fit: cover; }

.dark .sh-zalo-btn { background: var(--pi-bg-elevated, #334155); }

/* Draggable — visual states */
#sh-floating-buttons {
    cursor: grab;
    touch-action: none; /* Ngăn browser scroll khi drag */
    user-select: none;
    -webkit-user-select: none;
}
#sh-floating-buttons.sh-fab-dragging {
    cursor: grabbing;
    opacity: 0.85;
    transform: scale(0.95);
    filter: drop-shadow(0 8px 25px rgba(0,0,0,0.3));
}
#sh-floating-buttons a,
#sh-floating-buttons button {
    cursor: inherit; /* Kế thừa cursor grab từ container */
}
/* Reset cursor khi hover vào nút (nếu không đang drag) */
#sh-floating-buttons:not(.sh-fab-dragging) a:hover,
#sh-floating-buttons:not(.sh-fab-dragging) button:hover {
    cursor: pointer;
}

@media (max-width: 767px) {
    #sh-floating-buttons { bottom: 72px !important; }
}
