/* ========================================
   HMVIP Immersive Sidebar Actions (Phase 3)
   ======================================== */

.hmvip-player-actions-sidebar {
    position: absolute !important;
    right: 15px !important;
    bottom: 90px !important; /* Fixed Absolute Pixel Placement */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 24px !important;
    z-index: 9999 !important; /* Force above the video */
    pointer-events: auto !important; /* Permite hover/click */
}

/* Base button and item */
.hmvip-player-sidebar-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

/* 
 * NUKING BUDDYBOSS STYLES:
 * We must aggressively override .generic-button, .item-button, etc.
 * to ensure our buttons are transparent, floating, and reel-style.
 */
.hmvip-player-sidebar-item.generic-button,
.hmvip-player-sidebar-item .bp-activity-react-btn,
.hmvip-player-sidebar-item a.button,
.hmvip-player-sidebar-item a.item-button,
.hmvip-player-sidebar-item a.bp-activity-react-button,
.hmvip-sidebar-btn {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    line-height: inherit !important;
    color: transparent !important; /* Hide original text if any */
    cursor: pointer !important;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    outline: none !important;
    width: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hmvip-sidebar-btn:hover,
.hmvip-player-sidebar-item a.button:hover {
    transform: scale(1.1) !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
}

/* Wrapper BP Reaction e Ícones */
.hmvip-sidebar-icon-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 1 !important; /* Prevent font icon clipping */
}

/* The actual Icons (SVG, IMG, and Dashicons) */
.hmvip-sidebar-icon-wrapper svg,
.hmvip-sidebar-icon-wrapper img {
    width: 34px !important;
    height: 34px !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8)) !important; /* Reels style shadow */
    color: #ffffff !important; /* Force SVG white color instead of inherited transparent */
}

.hmvip-sidebar-icon-wrapper .dashicons {
    color: #ffffff !important;
    font-size: 34px !important;
    width: 34px !important;
    height: 34px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8) !important;
}

/* Counters */
.hmvip-player-sidebar-item .hmvip-sidebar-count {
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8) !important;
    text-align: center !important;
    line-height: 1 !important;
    margin-top: 4px !important;
}

/* ========================================
   Adaptações BuddyPress Reactions Emoji Picker
   ======================================== */
.hmvip-sidebar-like.generic-button.bp-activity-react-button-wrapper {
    position: relative !important;
    overflow: visible !important;
}

.hmvip-sidebar-like .emoji-picker {
    position: absolute !important;
    right: 50px !important;
    bottom: -10px !important;
    left: auto !important;
    background: rgba(0, 0, 0, 0.75) !important;
    border-radius: 30px !important;
    backdrop-filter: blur(10px) !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 8px 12px !important;
    gap: 8px !important;
    width: max-content !important;
    max-width: 250px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
}

.hmvip-sidebar-like .emoji-picker .emoji-pick {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    display: block !important;
    position: relative !important;
    cursor: pointer !important;
    transition: transform 0.2s !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hmvip-sidebar-like .emoji-picker .emoji-pick:hover {
    transform: scale(1.2) !important;
}

.hmvip-sidebar-like .emoji-picker .emoji-svg-holder {
    width: 100% !important;
    height: 100% !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    margin: 0 !important;
}

/* Ensure active reaction images never blow up */
.hmvip-sidebar-icon-wrapper img.bp-active-reaction-img,
.hmvip-sidebar-icon-wrapper img {
    width: 100% !important;
    height: 100% !important;
    max-width: 34px !important;
    max-height: 34px !important;
    object-fit: contain !important;
}

/* Hide legacy elements */
.hmvip-sidebar-like .bp-activity-react-button-text {
    display: none !important;
}

/* Responsividade Fullscreen */
.hmvip-immersive-fullscreen .hmvip-player-actions-sidebar {
    bottom: calc(env(safe-area-inset-bottom) + 80px) !important;
    right: calc(env(safe-area-inset-right) + 12px) !important;
    transform: scale(1.1) !important;
    transform-origin: bottom right !important;
}

@media (max-width: 768px) {
    .hmvip-player-actions-sidebar {
        gap: 16px !important;
        right: 8px !important;
        bottom: 50px !important; /* Fixed position immune to container height collapses */
    }
    
    .hmvip-player-sidebar-item .hmvip-sidebar-count {
        font-size: 11px !important;
        margin-top: 2px !important;
    }

    .hmvip-sidebar-icon-wrapper {
        width: 30px !important;
        height: 30px !important;
    }

    .hmvip-sidebar-icon-wrapper svg,
    .hmvip-sidebar-icon-wrapper img {
        width: 26px !important;
        height: 26px !important;
    }

    .hmvip-sidebar-icon-wrapper .dashicons {
        font-size: 28px !important;
        width: 28px !important;
        height: 28px !important;
    }

    /* Scaling down the BuddyPress emoji picker on mobile */
    .hmvip-sidebar-like .emoji-picker {
        transform: scale(0.85) !important;
        transform-origin: bottom right !important;
        right: 40px !important;
        bottom: -5px !important;
    }
    
    .hmvip-sidebar-icon-wrapper img.bp-active-reaction-img,
    .hmvip-sidebar-icon-wrapper img {
        max-width: 26px !important;
        max-height: 26px !important;
    }
}
