/* Gem Modal Styles */
.emoji-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
    padding: 12px;
    background: var(--bg-surface);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.emoji-btn {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    border: 2px solid transparent;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover {
    background: var(--bg-surface-hover);
    transform: scale(1.1);
}

.emoji-btn.selected {
    border-color: var(--accent-color);
    background: var(--bg-surface-hover);
}

.shared-user-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.shared-user-tag.editor {
    border-color: var(--accent-color);
    background: var(--accent-color-10);
}

.shared-user-tag .editor-badge,
.shared-user-tag .viewer-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shared-user-tag .editor-badge {
    background: var(--accent-color);
    color: white;
}

.shared-user-tag .viewer-badge {
    background: var(--bg-surface-hover);
    color: var(--text-secondary);
}

.shared-user-tag .remove-shared-user {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.shared-user-tag .remove-shared-user:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

#knowledge-files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.knowledge-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
}

.knowledge-file-item button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}

.knowledge-file-item button:hover {
    color: var(--danger-color);
}

/* Generate Instructions Button */
#generate-instructions-btn {
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    border: none;
    color: white;
    transition: all 0.2s;
}

#generate-instructions-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

#generate-instructions-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#generate-instructions-btn .spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}