/* Message Reactions - Animations & Styles */

.reaction-btn {
    position: absolute;
    bottom: -18px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.reaction-btn:hover {
    color: #fbb618;
    transform: scale(1.15);
}

.reaction-btn:active {
    transform: scale(0.9);
}

.reaction-btn svg {
    width: 16px;
    height: 16px;
}

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    bottom: calc(100% + 8px);
    background: #3d3d3d;
    border-radius: 12px;
    padding: 8px 10px;
    display: flex;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    z-index: 1001;
    animation: bounceIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.emoji-picker-emoji {
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    padding: 4px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.emoji-picker-emoji:hover {
    transform: scale(1.3);
}

.emoji-picker-emoji:active {
    transform: scale(1.1);
}

/* Reactions Display */
.message-reactions {
    position: absolute;
    bottom: -18px;
    right: 44px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.reaction-item {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: popIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.reaction-item:hover {
    transform: scale(1.15);
}

.reaction-item:active {
    transform: scale(0.9);
}

.reaction-emoji {
    font-size: 16px;
}

.reaction-count {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: #888;
    color: #1a1a1a;
    font-size: 9px;
    font-weight: bold;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.reaction-item:hover .reaction-tooltip {
    opacity: 1;
    visibility: visible;
}

.reaction-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #ccc;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    transition-delay: 0.5s;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    z-index: 1000;
}


/* === ANIMATIONS === */

/* Slide in animation for button */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Bounce in for emoji picker */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(10px);
    }
    50% {
        transform: scale(1.05) translateY(-5px);
    }
    70% {
        transform: scale(0.95) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Pop in for reactions */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse effect when adding reaction */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

