/* File Location: /public/css/reactions.css */

/* ═══════════════════════════════════════════════════════════════════
   EMOJI PICKER
   ═══════════════════════════════════════════════════════════════════ */

#emojiPickerModal {
    position: fixed;
    display: none;
    background: #2b2d31;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    width: 320px;
    max-height: 400px;
    z-index: 9999;
    overflow: hidden;
}

.emoji-picker-tabs {
    display: flex;
    border-bottom: 1px solid #3f4147;
    background: #232428;
}

.emoji-tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: #b5bac1;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s;
    border-bottom: 2px solid transparent;
}

    .emoji-tab-btn:hover {
        background: #2b2d31;
        color: #dbdee1;
    }

    .emoji-tab-btn.active {
        color: #fff;
        border-bottom-color: #5865f2;
    }

.emoji-picker-content {
    max-height: 340px;
    overflow-y: auto;
    padding: 12px;
}

.emoji-picker-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.emoji-option {
    background: none;
    border: none;
    padding: 8px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .emoji-option:hover {
        background: #3f4147;
    }

    .emoji-option img {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }

.emoji-empty {
    text-align: center;
    color: #80848e;
    padding: 32px 16px;
    font-size: 14px;
}

/* Custom scrollbar for emoji picker */
.emoji-picker-content::-webkit-scrollbar {
    width: 8px;
}

.emoji-picker-content::-webkit-scrollbar-track {
    background: #2b2d31;
}

.emoji-picker-content::-webkit-scrollbar-thumb {
    background: #1e1f22;
    border-radius: 4px;
}

    .emoji-picker-content::-webkit-scrollbar-thumb:hover {
        background: #3f4147;
    }

/* ═══════════════════════════════════════════════════════════════════
   REACTIONS DISPLAY
   ═══════════════════════════════════════════════════════════════════ */

.message-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.reaction-bubble {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #2b2d31;
    border: 1px solid #3f4147;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
}

    .reaction-bubble:hover {
        background: #3f4147;
        border-color: #5865f2;
    }

    .reaction-bubble.reacted {
        background: rgba(88, 101, 242, 0.15);
        border-color: #5865f2;
    }

        .reaction-bubble.reacted:hover {
            background: rgba(88, 101, 242, 0.25);
        }

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

.reaction-count {
    color: #b5bac1;
    font-weight: 500;
    font-size: 12px;
}

.reaction-bubble.reacted .reaction-count {
    color: #5865f2;
}

.custom-emoji-small {
    width: 16px;
    height: 16px;
    object-fit: contain;
    vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════════
   MESSAGE EMOJI BUTTON
   ═══════════════════════════════════════════════════════════════════ */

.message-actions {
    position: absolute;
    top: -12px;
    right: 20px;
    display: none;
    background: #313338;
    border: 1px solid #1e1f22;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.message:hover .message-actions {
    display: flex;
}

.message-emoji-btn,
.message-action-btn {
    background: none;
    border: none;
    color: #b5bac1;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.15s;
}

    .message-emoji-btn:hover,
    .message-action-btn:hover {
        color: #dbdee1;
    }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    #emojiPickerModal {
        width: 280px;
    }

    .emoji-picker-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .emoji-option {
        font-size: 20px;
        padding: 6px;
    }
}
