/* ================================================================
   COMPACT INLINE REACTIONS - For Action Bars
   Designed to fit in one line with other action buttons
   ================================================================ */

/* Main Container - Inline Display */
.reactions-inline-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Reactions Display - Inline */
.reactions-display-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.reactions-display-inline:empty {
    display: none;
}

/* Compact Reaction Badges */
.reaction-badge-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    background: white;
    font-size: 0.8125rem;
    color: #4b5563;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1;
}

.reaction-badge-compact:hover {
    border-color: #8b5cf6;
    background: #faf5ff;
    transform: translateY(-1px);
}

.reaction-badge-compact.user-reacted {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-color: #8b5cf6;
    color: white;
}

.reaction-badge-compact .emoji {
    font-size: 0.95rem;
    line-height: 1;
}

.reaction-badge-compact .count {
    font-weight: 600;
    font-size: 0.8125rem;
    min-width: 12px;
    text-align: center;
}

/* Add Reaction Button - Compact */
.btn-add-reaction-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border: 1.5px dashed #cbd5e0;
    border-radius: 16px;
    background: white;
    color: #6b7280;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.2;
}

.btn-add-reaction-compact:hover {
    border-color: #8b5cf6;
    background: #faf5ff;
    color: #8b5cf6;
}

.btn-add-reaction-compact .icon {
    font-size: 1rem;
    line-height: 1;
}

.btn-add-reaction-compact .text {
    font-size: 0.8125rem;
}

/* Compact Picker Popup */
.reaction-picker-compact {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    min-width: 300px;
    animation: slideDown 0.15s ease;
}

.picker-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.picker-header-compact .picker-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.picker-header-compact .btn-close-picker {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s;
}

.picker-header-compact .btn-close-picker:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Reaction Categories in Compact Picker */
.reaction-category-compact {
    margin-bottom: 0.75rem;
}

.reaction-category-compact:last-child {
    margin-bottom: 0;
}

.category-label-compact {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.category-label-compact .icon {
    font-size: 0.9rem;
}

.category-label-compact.positive .text {
    color: #10b981;
}

.category-label-compact.negative .text {
    color: #ef4444;
}

/* Compact Reaction Buttons Grid */
.reaction-buttons-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.reaction-btn-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.65rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    background: white;
    color: #4b5563;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.reaction-btn-compact:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.reaction-btn-compact.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-color: #8b5cf6;
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.reaction-btn-compact.active:hover {
    transform: translateY(-2px) scale(1.03);
}

.reaction-btn-compact .emoji {
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.15s;
}

.reaction-btn-compact:hover .emoji {
    transform: scale(1.1);
}

.reaction-btn-compact.active .emoji {
    animation: bounceSmall 0.4s ease;
}

@keyframes bounceSmall {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.2); 
    }
}

.reaction-btn-compact .name {
    font-size: 0.8125rem;
}

/* Separator between positive and negative */
.reaction-separator {
    width: 1px;
    height: 24px;
    background: #e5e7eb;
    margin: 0 0.25rem;
}

/* Mini Summary in Picker */
.picker-summary-compact {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f3f4f6;
    text-align: center;
}

.picker-summary-compact .summary-text {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .reaction-picker-compact {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 12px 12px 0 0;
        min-width: auto;
        animation: slideUp 0.2s ease;
    }
    
    .reactions-inline-compact {
        flex-wrap: wrap;
    }
    
    .btn-add-reaction-compact {
        padding: 0.25rem 0.5rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .reactions-inline-compact {
        color: #e5e7eb;
    }
    
    .reaction-badge-compact,
    .btn-add-reaction-compact,
    .reaction-picker-compact,
    .reaction-btn-compact {
        background: #1f2937;
        border-color: #374151;
        color: #9ca3af;
    }
    
    .reaction-badge-compact:hover,
    .btn-add-reaction-compact:hover {
        background: #312e81;
        border-color: #8b5cf6;
    }
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Ensure it works in flex containers */
.post-actions-top .reactions-inline-compact,
.post-action-buttons .reactions-inline-compact {
    position: relative;
}
