/**
 * Reaction Dropdown Positioning Fix
 * Fixes the issue where reaction options appear too high above the reaction button
 * The dropdown should appear below the actions container, not above it
 */

/* Fix reaction dropdown positioning - position it below the actions container */
.ps-reactions__dropdown {
    top: 100% !important; /* Position below instead of above */
    bottom: auto !important; /* Override the default bottom positioning */
    margin-top: 5px !important; /* Add small gap between button and dropdown */
    margin-bottom: 0 !important; /* Remove bottom margin */
}

/* Alternative positioning for better visual alignment */
.ps-post__actions .ps-reactions__dropdown {
    top: 100% !important;
    bottom: auto !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
}

/* Ensure dropdown doesn't overlap with content above */
.ps-reactions__dropdown {
    max-height: 200px !important;
    overflow-y: auto !important;
}

/* Improve dropdown positioning in different contexts */
.ps-post__footer .ps-reactions__dropdown,
.stream-actions .ps-reactions__dropdown {
    top: 100% !important;
    bottom: auto !important;
    margin-top: 10px !important;
    margin-bottom: 0 !important;
}

/* Fix for mobile/responsive views */
@media (max-width: 768px) {
    .ps-reactions__dropdown {
        top: 100% !important;
        bottom: auto !important;
        margin-top: 5px !important;
        margin-bottom: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: 90vw !important;
    }
}

/* Ensure proper z-index layering */
.ps-reactions__dropdown {
    z-index: 1000 !important;
}

/* Fix for lightbox context if needed */
.ps-lightbox .ps-reactions__dropdown {
    top: 100% !important;
    bottom: auto !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
}

/* Ensure the parent container has proper positioning context */
.ps-post__actions.stream-actions {
    position: relative !important;
}

/* Additional positioning fixes for different PeepSo contexts */
.ps-post__action--reaction {
    position: relative !important;
}

/* Fix for when reactions appear in different post layouts */
.ps-post .ps-reactions__dropdown {
    top: 100% !important;
    bottom: auto !important;
    margin-top: 6px !important;
    margin-bottom: 0 !important;
}

/* Ensure dropdown appears above other elements */
.ps-reactions__dropdown {
    position: absolute !important;
    z-index: 9999 !important;
}

/* Specific fix for dropdowns inside ps-post__actions-inner */
.ps-post__actions-inner .ps-reactions__dropdown {
    top: 100% !important;
    bottom: auto !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
}
